HomeSort by relevance Sort by last modified time
    Searched refs:Era (Results 1 - 25 of 45) sorted by null

1 2

  /libcore/ojluni/src/test/java/time/tck/java/time/chrono/
CopticEra.java 60 import java.time.chrono.Era;
63 * An era in the Coptic calendar system.
65 * The Coptic calendar system uses the 'Era of the Martyrs'.
74 public enum CopticEra implements Era {
77 * The singleton instance for the era BEFORE_AM, 'Before Era of the Martyrs'.
82 * The singleton instance for the era AM, 'Era of the Martyrs'.
94 * @param era the BEFORE_AM/AM value to represent, from 0 (BEFORE_AM) to 1 (AM)
95 * @return the era singleton, not nul
    [all...]
CopticChronology.java 63 import java.time.chrono.Era;
80 * <li>era - There are two eras, the current 'Era of the Martyrs' (AM) and the previous era (ERA_ERA_BEFORE_AM).
81 * <li>year-of-era - The year-of-era for the current era increases uniformly from the epoch at year one.
82 * For the previous era the year increases from one as time goes backwards.
83 * <li>proleptic-year - The proleptic year is the same as the year-of-era for the
84 * current era. For the previous era, years have zero, then negative values
    [all...]
TCKHijrahEra.java 59 import static java.time.temporal.ChronoField.ERA;
63 import java.time.chrono.Era;
86 public void test_valueOf(HijrahEra era , String eraName, int eraValue) {
87 assertEquals(era.getValue(), eraValue);
89 assertEquals(HijrahChronology.INSTANCE.eraOf(eraValue), era); local
90 assertEquals(HijrahEra.of(eraValue), era); local
91 assertEquals(HijrahEra.valueOf(eraName), era); local
99 List<Era> eraList = HijrahChronology.INSTANCE.eras();
102 for (HijrahEra era : eras) {
103 assertTrue(eraList.contains(era));
    [all...]
TCKIsoEra.java 59 import static java.time.temporal.ChronoField.ERA;
63 import java.time.chrono.Era;
87 public void test_valueOf(IsoEra era , String eraName, int eraValue) {
88 assertEquals(era.getValue(), eraValue);
89 assertEquals(IsoEra.of(eraValue), era); local
90 assertEquals(IsoEra.valueOf(eraName), era); local
98 List<Era> eraList = IsoChronology.INSTANCE.eras();
101 for (IsoEra era : eras) {
102 assertTrue(eraList.contains(era));
111 for (IsoEra era : IsoEra.values())
    [all...]
TCKMinguoEra.java 60 import static java.time.temporal.ChronoField.ERA;
64 import java.time.chrono.Era;
91 public void test_valueOf(MinguoEra era , String eraName, int eraValue) {
92 assertEquals(era.getValue(), eraValue);
93 assertEquals(MinguoEra.of(eraValue), era); local
94 assertEquals(MinguoEra.valueOf(eraName), era); local
103 List<Era> eraList = MinguoChronology.INSTANCE.eras();
106 for (MinguoEra era : eras) {
107 assertTrue(eraList.contains(era));
116 for (MinguoEra era : MinguoEra.values())
    [all...]
TCKThaiBuddhistEra.java 59 import static java.time.temporal.ChronoField.ERA;
63 import java.time.chrono.Era;
91 public void test_valueOf(ThaiBuddhistEra era , String eraName, int eraValue) {
92 assertEquals(era.getValue(), eraValue);
93 assertEquals(ThaiBuddhistEra.of(eraValue), era); local
94 assertEquals(ThaiBuddhistEra.valueOf(eraName), era); local
102 List<Era> eraList = ThaiBuddhistChronology.INSTANCE.eras();
105 for (ThaiBuddhistEra era : eras) {
106 assertTrue(eraList.contains(era));
115 for (ThaiBuddhistEra era : ThaiBuddhistEra.values())
    [all...]
TCKJapaneseEra.java 59 import static java.time.temporal.ChronoField.ERA;
63 import java.time.chrono.Era;
88 public void test_valueOf(JapaneseEra era , String eraName, int eraValue) {
89 assertEquals(era.getValue(), eraValue);
90 assertEquals(JapaneseEra.of(eraValue), era); local
91 assertEquals(JapaneseEra.valueOf(eraName), era); local
99 List<Era> eraList = JapaneseChronology.INSTANCE.eras();
102 for (JapaneseEra era : eras) {
103 assertTrue(eraList.contains(era));
113 for (JapaneseEra era : JapaneseEra.values())
    [all...]
  /libcore/ojluni/src/main/java/java/time/chrono/
HijrahEra.java 64 import static java.time.temporal.ChronoField.ERA;
73 * An era in the Hijrah calendar system.
75 * The Hijrah calendar system has only one era covering the
86 public enum HijrahEra implements Era {
89 * The singleton instance for the current era, 'Anno Hegirae',
98 * The current era, which is the only accepted value, has the value 1
100 * @param hijrahEra the era to represent, only 1 supported
108 throw new DateTimeException("Invalid era: " + hijrahEra);
114 * Gets the numeric era {@code int} value.
116 * The era AH has the value 1
    [all...]
IsoEra.java 67 * An era in the ISO calendar system.
70 * A definition has therefore been created with two eras - 'Current era' (CE) for
71 * years on or after 0001-01-01 (ISO), and 'Before current era' (BCE) for years before that.
76 * <th class="colFirst" align="left">year-of-era</th>
77 * <th class="colFirst" align="left">era</th>
105 public enum IsoEra implements Era {
108 * The singleton instance for the era before the current one, 'Before Current Era',
113 * The singleton instance for the current era, 'Current Era',
    [all...]
MinguoEra.java 67 * An era in the Minguo calendar system.
70 * The current era, for years from 1 onwards, is known as the 'Republic of China' era.
72 * in the year-of-era count, are part of the 'Before Republic of China' era.
77 * <th class="colFirst" align="left">year-of-era</th>
78 * <th class="colFirst" align="left">era</th>
107 public enum MinguoEra implements Era {
110 * The singleton instance for the era before the current one, 'Before Republic of China Era',
    [all...]
ThaiBuddhistEra.java 67 * An era in the Thai Buddhist calendar system.
70 * The current era, for years from 1 onwards, is known as the 'Buddhist' era.
72 * in the year-of-era count, are part of the 'Before Buddhist' era.
77 * <th class="colFirst" align="left">year-of-era</th>
78 * <th class="colFirst" align="left">era</th>
107 public enum ThaiBuddhistEra implements Era {
110 * The singleton instance for the era before the current one, 'Before Buddhist Era',
    [all...]
MinguoChronology.java 89 * <li>era - There are two eras, the current 'Republic' (ERA_ROC) and the previous era (ERA_BEFORE_ROC).
90 * <li>year-of-era - The year-of-era for the current era increases uniformly from the epoch at year one.
91 * For the previous era the year increases from one as time goes backwards.
92 * The value for the current era is equal to the ISO proleptic-year minus 1911.
93 * <li>proleptic-year - The proleptic year is the same as the year-of-era for the
94 * current era. For the previous era, years have zero, then negative values
    [all...]
JapaneseEra.java 65 import static java.time.temporal.ChronoField.ERA;
86 * An era in the Japanese Imperial calendar system.
99 implements Era, Serializable {
101 // The offset value to 0-based index from the era value.
105 static final sun.util.calendar.Era[] ERA_CONFIG;
108 * The singleton instance for the 'Meiji' era (1868-01-01 - 1912-07-29)
113 * The singleton instance for the 'Taisho' era (1912-07-30 - 1926-12-24)
118 * The singleton instance for the 'Showa' era (1926-12-25 - 1989-01-07)
123 * The singleton instance for the 'Heisei' era (1989-01-08 - current)
129 // There could be an extra era defined in its configuration
251 JapaneseEra era = KNOWN_ERAS[i]; local
270 JapaneseEra era = KNOWN_ERAS[i]; local
    [all...]
Chronology.java 110 * an era, year-of-era, month-of-year, day-of-month model of a date, this is not required.
125 * <li> {@link #date(Era, int, int, int) date(era, yearOfEra, month, day)}
127 * <li> {@link #dateYearDay(Era, int, int) dateYearDay(era, yearOfEra, dayOfYear)}
134 * {@code Chronology}, {@code ChronoLocalDate} and {@code Era}.
296 * Obtains a local date in this chronology from the era, year-of-era,
300 * The default implementation combines the era and year-of-era into a prolepti
    [all...]
IsoChronology.java 66 import static java.time.temporal.ChronoField.ERA;
104 * <li>era - There are two eras, 'Current Era' (CE) and 'Before Current Era' (BCE).
105 * <li>year-of-era - The year-of-era is the same as the proleptic-year for the current CE era.
106 * For the BCE era before the ISO epoch the year increases from 1 upwards as time goes backwards.
107 * <li>proleptic-year - The proleptic year is the same as the year-of-era for the
108 * current era. For the previous era, years have zero, then negative values
514 Long era = fieldValues.remove(ERA); local
    [all...]
ThaiBuddhistChronology.java 90 * <li>era - There are two eras, the current 'Buddhist' (ERA_BE) and the previous era (ERA_BEFORE_BE).
91 * <li>year-of-era - The year-of-era for the current era increases uniformly from the epoch at year one.
92 * For the previous era the year increases from one as time goes backwards.
93 * The value for the current era is equal to the ISO proleptic-year plus 543.
94 * <li>proleptic-year - The proleptic year is the same as the year-of-era for the
95 * current era. For the previous era, years have zero, then negative values
    [all...]
  /libcore/ojluni/src/main/java/sun/util/calendar/
Era.java 32 * The class <code>Era</code> represents a calendar era that defines a
35 * calendar system. An era starts at any point of time (Gregorian) that is
38 * <p><code>Era</code>s that are applicable to a particular calendar
43 * <p>The following era names are defined in this release.
46 * Calendar system Era name Since (in Gregorian)
63 public final class Era {
71 * Constructs an <code>Era</code> instance.
73 * @param name the era name (e.g., "BeforeCommonEra" for the Julian calendar system)
74 * @param abbr the abbreviation of the era name (e.g., "B.C.E." for "BeforeCommonEra"
    [all...]
LocalGregorianCalendar.java 49 private Era[] eras;
63 public Date setEra(Era era) {
64 if (getEra() != era) {
65 super.setEra(era);
93 void setLocalEra(Era era) {
94 super.setEra(era);
105 Era era = getEra() local
168 Era era = new Era(eraName, abbr, since, localTime); local
212 Era era = eras[i]; local
242 Era era = ldate.getEra(); local
288 Era era = null; local
355 Era era = ldate.getEra(); local
    [all...]
JulianCalendar.java 41 private static final Era[] eras = {
42 new Era("BeforeCommonEra", "B.C.E.", Long.MIN_VALUE, false),
43 new Era("CommonEra", "C.E.", -62135709175808L, true)
58 public Date setEra(Era era) {
59 if (era == null) {
62 if (era != eras[0] || era != eras[1]) {
63 throw new IllegalArgumentException("unknown era: " + era);
98 Era era = getEra(); local
    [all...]
AbstractCalendar.java 60 private Era[] eras;
65 public Era getEra(String eraName) {
76 public Era[] getEras() {
77 Era[] e = null;
79 e = new Era[eras.length];
90 Era e = eras[i];
96 throw new IllegalArgumentException("unknown era name: " + eraName);
99 protected void setEras(Era[] eras) {
CalendarSystem.java 262 * Returns the <code>Era</code> designated by the era name that
263 * has to be known to this calendar system. If no Era is
266 * @param eraName the name of the era
267 * @return the <code>Era</code> designated by
268 * <code>eraName</code>, or <code>null</code> if no Era is
269 * applicable to this calendar system or the specified era name is
272 public abstract Era getEra(String eraName);
275 * Returns valid <code>Era</code>s of this calendar system. The
277 * element of the returned array is the oldest era.) If no era i
    [all...]
CalendarDate.java 67 private Era era; field in class:CalendarDate
97 public Era getEra() {
98 return era;
102 * Sets the era of the date to the specified era. The default
103 * implementation of this method accepts any Era value, including
107 * <code>CalendarDate</code> requires eras and the specified era
110 * <code>era</code> is unknown to the calendar
113 public CalendarDate setEra(Era era)
418 int era = 0; local
    [all...]
  /libcore/ojluni/src/test/java/time/tck/java/time/chrono/serial/
TCKEraSerialization.java 71 import java.time.chrono.Era;
100 Era[][] data_of_calendars() {
101 return new Era[][] {
113 public void test_eraSerialization(Era era) throws IOException, ClassNotFoundException {
114 assertSerializableSame(era);
122 for (JapaneseEra era : JapaneseEra.values()) {
123 assertSerializableSame(era);
128 dos.writeByte(era.getValue());
131 assertSerializedBySer(era, bytes)
    [all...]
  /libcore/luni/src/test/java/libcore/java/time/chrono/
ChronologyDisplayNameTest.java 22 import java.time.chrono.Era;
61 List<Era> eras = chronology.eras();
63 for (Era era : eras) {
64 assertNotNull(era);
65 String displayName = era.getDisplayName(TextStyle.FULL, Locale.ENGLISH);
68 assertTrue("Era name for " + era + " not unique.", eraNames.add(displayName));
ChronologyTest.java 22 import java.time.chrono.Era;
120 public int prolepticYear(Era era, int yearOfEra) {
125 public Era eraOf(int eraValue) {
130 public List<Era> eras() {

Completed in 370 milliseconds

1 2