Mega Code Archive

 
Categories / Java Book / 003 Essential Classes
 

0200 Compare to Calendar

boolean after(Object when) Returns whether this Calendar represents a time after the time represented by the specified Object. boolean before(Object when) Returns whether this Calendar represents a time before the time represented by the specified Object. int compareTo(Calendar anotherCalendar) Compares the time values (millisecond offsets from the Epoch) represented by two Calendar objects. boolean equals(Object obj) Compares this Calendar to the specified Object. Calendar and display name static Locale[] getAvailableLocales() Returns an array of all locales for which the getInstance methods of this class can return localized instances. String getDisplayName(int field, int style, Locale locale) Returns the string representation of the calendar field value in the given style and locale. Map<String,Integer> getDisplayNames(int field, int style, Locale locale) Returns a Map containing all names of the calendar field in the given style and locale and their corresponding field values.