Save This Page
Home » openjdk-7 » sun » util » calendar » [javadoc | source]
public final class: Era [javadoc | source]
The class Era represents a calendar era that defines a period of time in which the same year numbering is used. For example, Gregorian year 2004 is Heisei 16 in the Japanese calendar system. An era starts at any point of time (Gregorian) that is represented by CalendarDate.

Eras that are applicable to a particular calendar system can be obtained by calling CalendarSystem#getEras one of which can be used to specify a date in CalendarDate.

The following era names are defined in this release.

  Calendar system         Era name         Since (in Gregorian)
  Japanese calendar       Meiji            1868-01-01 midnight local time
                          Taisho           1912-07-30 midnight local time
                          Showa            1926-12-26 midnight local time
                          Heisei           1989-01-08 midnight local time
  Julian calendar         BeforeCommonEra  -292275055-05-16T16:47:04.192Z
                          CommonEra        0000-12-30 midnight local time
  Taiwanese calendar      MinGuo           1911-01-01 midnight local time
  Thai Buddhist calendar  BuddhistEra      -543-01-01 midnight local time
 public Era(String name,
    String abbr,
    long since,
    boolean localTime) 
    Constructs an Era instance.
    name - the era name (e.g., "BeforeCommonEra" for the Julian calendar system)
    abbr - the abbreviation of the era name (e.g., "B.C.E." for "BeforeCommonEra")
    since - the time (millisecond offset from January 1, 1970 (Gregorian) UTC or local time) when the era starts, inclusive.
    localTime - true if since specifies a local time; false if since specifies UTC
Method from sun.util.calendar.Era Summary:
equals,   getAbbreviation,   getDiaplayAbbreviation,   getDisplayName,   getName,   getSince,   getSinceDate,   hashCode,   isLocalTime,   toString
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from sun.util.calendar.Era Detail:
 public boolean equals(Object o) 
 public String getAbbreviation() 
 public String getDiaplayAbbreviation(Locale locale) 
 public String getDisplayName(Locale locale) 
 public String getName() 
 public long getSince(TimeZone zone) 
 public CalendarDate getSinceDate() 
 public int hashCode() 
 public boolean isLocalTime() 
 public String toString()