GregorianCalendar class Methods in Java Part -II

java.util.GregorianCalendar

GregorianCalendar is a concrete subclass of Calendar and provides the standard calendar system used by most of the world. GregorianCalendar is a hybrid calendar that supports both the Julian and Gregorian calendar systems with the support of a single discontinuity.


Some methods of GregorianCalendar Class.


getFirstDayOfWeek()This method gets what the first day of the week.


getGreatestMinimum(int)This method returns the highest minimum value for the given calendar field of this GregorianCalendar instance.


getGregorianChange()This method gets the Gregorian Calendar change date.


GregorianCalendar.getInstance()This method gets a calendar using the default time zone and locale.


GregorianCalendar.getInstance(Locale)This method gets a calendar using the default time zone and specified locale.


GregorianCalendar.getInstance(TimeZone)This method gets a calendar using the specified time zone and default locale.


GregorianCalendar.getInstance(TimeZone, Locale)his method gets a calendar with the specified time zone and locale.


getLeastMaximum(int)This method returns the lowest maximum value for the given calendar field of this GregorianCalendar instance.


getMaximum(int)This method returns the maximum value for the given calendar field of this GregorianCalendar instance.


getMinimalDaysInFirstWeek()This method gets the minimal days required in the first week of the year.


getMinimum(int)This method returns the minimum value for the given calendar field of this GregorianCalendar instance.


getTime()This method returns a Date object representing this Calendar's time value.


getTimeInMillis()This method returns this Calendar's time value in milliseconds.


getTimeZone()This method gets the time zone.


getWeeksInWeekYear()This method returns the number of weeks in the week year represented by this GregorianCalendar.


getWeekYear()This method returns the week year represented by this GregorianCalendar.


hashCode()This method generates the hash code for this GregorianCalendar object.


isLeapYear(int)This method determines if the given year is a leap year. Returns true if the given year is a leap year.


isLenient()This method tells whether date/time interpretation is to be lenient.


isSet(int)This method determines if the given calendar field has a value set.


GregorianCalendar class Methods Part -I


GregorianCalendar class Methods Part -III


No comments:

Post a Comment