Skip to content

Tag Archives: Java-DateFormat

Given a date in the form of a string, the task is to write a Java Program to get the day, month, and year from… Read More
The setCalendar() Method of DateFormat class in Java is used to set the calendar associated with this date/time format object. In the initial stage the… Read More
The parse(String the_text, ParsePosition position) Method of DateFormat class is used to parse the text from a string to produce the Date. The method parses… Read More
The isLenient() method in DateFormat class is used to know and understand whether the parsing of date and time of this DateFormat object is to… Read More
The setLenient(boolean leniency) method in DateFormat class is used to specify whether the interpretation of the date and time of this DateFormat object is to… Read More
The setTimeZone() method in DateFormat class is used to set the time-zone of the calendar of this DateFormat. Syntax: public void setTimeZone(TimeZone time_zone) Parameters: The… Read More
The getTimeInstance() Method of DateFormat class in Java is used to get the time formatter. This time formatter comes with default formatting style for a… Read More
The getDateInstance() Method of DateFormat class in Java is used to get the date formatter. This date formatter comes with default formatting style for a… Read More
The getAvailableLocales() method of DateFormat class in Java is used to return an array of all the locales available at the localized instances of the… Read More
The getTimeZone() method in DateFormat class is used to return the current time-zone of the calendar of this DateFormat. Syntax: public TimeZone getTimeZone() Parameters: The… Read More
The getCalendar() Method of DateFormat class in Java is used to get the calendar associated with this date/time format object. Syntax: public Calendar getCalendar() Parameter:… Read More
The getDateTimeInstance() Method of DateFormat class in Java is used to get the Date/Time formatter. This Date/Time formatter comes with default formatting style for a… Read More
The format() Method of DateFormat class in Java is used to format a given date into Date/Time string. Basically the method is used to convert… Read More
The equals() Method of the DateFormat class is used to compare two DateFormat objects. The method returns True if this DateFormat is equal to the… Read More
The hashCode() Method of DateFormat class is used to return the hash code value of this DateFormat object. The hash code is of integer type.… Read More