Skip to content
Mohammad Amin Hassani edited this page Jun 17, 2019 · 8 revisions

All implemented methods in calendars:

Method Signature Return Type
• add (int field, int amount) void
Adds or subtracts the specified amount of time to the given calendar field, based on the calendar's rules .
• after (Object whenCalendar) boolean
Returns whether this Calendar represents a time after the time represented by the specified Object.
• before (Object whenCalendar) boolean
Returns whether this Calendar represents a time before the time represented by the specified Object.
• clear () void
Sets all the calendar field values and the time value (millisecond offset from the Epoch) of this Calendar undefined.
• clear (int field) void
Sets the given calendar field value and the time value (millisecond offset from the Epoch) of this Calendar undefined.
• clone () void
Creates and returns a copy of this object.
• compareTo (PrimeCalendar anotherCalendar) int
Compares the time values (millisecond offsets from the Epoch) represented by two PrimeCalendar objects.
• equals (Object object) boolean
Compares this Calendar to the specified Object.
• get (int field) int
Returns the value of the given calendar field.
• getActualMaximum (int field) int
Returns the maximum value that the specified calendar field could have, given the time value of this Calendar.
• getActualMinimum (int field) int
Returns the minimum value that the specified calendar field could have, given the time value of this Calendar.
• getDisplayName (int field, int style, Locale locale) String
Returns the string representation of the calendar field value in the given style and locale.
• getDisplayNames (int field, int style, Locale locale) Map
Returns a Map containing all names of the calendar field in the given style and locale and their corresponding field values.
• getFirstDayOfWeek () int
Gets what the first day of the week is; e.g., SUNDAY in the U.S., MONDAY in France.
• getGreatestMinimum (int field) int
Returns the highest minimum value for the given calendar field of this Calendar instance.
• getLeastMaximum (int field) int
Returns the lowest maximum value for the given calendar field of this Calendar instance.
• getMaximum (int field) int
Returns the maximum value for the given calendar field of this Calendar instance.
• getMinimum (int field) int
Returns the minimum value for the given calendar field of this Calendar instance.
• getTime () Date
Returns a Date object representing this Calendar's time value (millisecond offset from the Epoch").
• getTimeInMillis () long
Returns this Calendar's time value in milliseconds.
• getTimeZone () TimeZone
Gets the time zone.
• hashCode () int
Returns a hash code for this calendar.
• isSet (int field) boolean
Determines if the given calendar field has a value set, including cases that the value has been set by internal fields calculations triggered by a get method call.
• roll (int field, boolean up) void
Adds or subtracts (up/down) a single unit of time on the given time field without changing larger fields.
• roll (int field, int amount) void
Adds the specified (signed) amount to the specified calendar field without changing larger fields.
• set (int field, int value) void
Sets the given calendar field to the given value.
• set (int year, int month, int dayOfMonth) void
Sets the values for the calendar fields YEAR, MONTH, and DAY_OF_MONTH.
• set (int year, int month, int dayOfMonth, int hourOfDay, int minute) void
Sets the values for the calendar fields YEAR, MONTH, DAY_OF_MONTH, HOUR_OF_DAY, and MINUTE.
• set (int year, int month, int dayOfMonth, int hourOfDay, int minute, int second) void
Sets the values for the fields YEAR, MONTH, DAY_OF_MONTH, HOUR, MINUTE, and SECOND.
• setFirstDayOfWeek (int value) void
Sets what the first day of the week is; e.g., SUNDAY in the U.S., MONDAY in France.
• setTime (Date date) void
Sets this Calendar's time with the given Date.
• setTimeInMillis (long millis) void
Sets this Calendar's current time from the given long value.
• setTimeZone (TimeZone value) void
Sets the time zone with the given time zone value.
• toString () String
Return a string representation of this calendar.
Clone this wiki locally