-
Notifications
You must be signed in to change notification settings - Fork 14
Home
Mohammad Amin Hassani edited this page Jun 19, 2019
·
8 revisions
All implemented methods and fields in PrimeCalendar:
| 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. | |
| Field | Type |
| • Calendar.ERA | int |
| Field number for get and set indicating the era, e.g., AD or BC in the Julian calendar. | |
| • Calendar.YEAR | int |
| Field number for get and set indicating the year. | |
| • Calendar.MONTH | int |
| Field number for get and set indicating the month. | |
| • Calendar.WEEK_OF_YEAR | int |
| Field number for get and set indicating the week number within the current year. | |
| • Calendar.WEEK_OF_MONTH | int |
| Field number for get and set indicating the week number within the current month. | |
| • Calendar.DATE | int |
| Field number for get and set indicating the day of the month. | |
| • Calendar.DAY_OF_MONTH | int |
| Field number for get and set indicating the day of the month. | |
| • Calendar.DAY_OF_YEAR | int |
| Field number for get and set indicating the day number within the current year. | |
| • Calendar.DAY_OF_WEEK | int |
| Field number for get and set indicating the day of the week. | |
| • Calendar.DAY_OF_WEEK_IN_MONTH | int |
| Field number for get and set indicating the ordinal number of the day of the week within the current month. | |
| • Calendar.AM_PM | int |
| Field number for get and set indicating whether the HOUR is before or after noon. | |
| • Calendar.HOUR | int |
| Field number for get and set indicating the hour of the morning or afternoon. | |
| • Calendar.HOUR_OF_DAY | int |
| Field number for get and set indicating the hour of the day. | |
| • Calendar.MINUTE | int |
| Field number for get and set indicating the minute within the hour. | |
| • Calendar.SECOND | int |
| Field number for get and set indicating the second within the minute. | |
| • Calendar.MILLISECOND | int |
| Field number for get and set indicating the millisecond within the second. | |
| • Calendar.ZONE_OFFSET | int |
| Field number for get and set indicating the raw offset from GMT in milliseconds. | |
| • Calendar.DST_OFFSET | int |
| Field number for get and set indicating the daylight saving offset in milliseconds. | |