Home
last modified time | relevance | path

Searched refs:ERA (Results 1 – 25 of 73) sorted by relevance

123

/libcore/ojluni/src/test/java/time/tck/java/time/chrono/
DTCKJapaneseEra.java59 import static java.time.temporal.ChronoField.ERA;
115 assertEquals(era.range(ERA).getMinimum(), -1); in test_range()
116 assertEquals(era.range(ERA).getLargestMinimum(), -1); in test_range()
117 assertEquals(era.range(ERA).getSmallestMaximum(), era.range(ERA).getMaximum()); in test_range()
118 assertEquals(era.range(ERA).getMaximum() >= 2, true); in test_range()
DTCKMinguoEra.java60 import static java.time.temporal.ChronoField.ERA;
117 assertEquals(era.range(ERA), ValueRange.of(0, 1)); in test_range()
DTCKHijrahEra.java59 import static java.time.temporal.ChronoField.ERA;
113 assertEquals(era.range(ERA), ValueRange.of(1, 1)); in test_range()
DTCKThaiBuddhistEra.java59 import static java.time.temporal.ChronoField.ERA;
116 assertEquals(era.range(ERA), ValueRange.of(0, 1)); in test_range()
DTCKIsoEra.java59 import static java.time.temporal.ChronoField.ERA;
112 assertEquals(era.range(ERA), ValueRange.of(0, 1)); in test_range()
/libcore/ojluni/src/main/java/java/time/chrono/
DEra.java64 import static java.time.temporal.ChronoField.ERA;
147 return field == ERA; in isSupported()
209 if (field == ERA) { in get()
239 if (field == ERA) { in getLong()
301 return temporal.with(ERA, getValue()); in adjustInto()
321 … return new DateTimeFormatterBuilder().appendText(ERA, style).toFormatter(locale).format(this); in getDisplayName()
DHijrahEra.java64 import static java.time.temporal.ChronoField.ERA;
152 if (field == ERA) { in range()
DChronoLocalDateImpl.java60 import static java.time.temporal.ChronoField.ERA;
209 case ERAS: return with(ERA, Math.addExact(getLong(ERA), amountToAdd)); in plus()
388 case ERAS: return end.getLong(ERA) - getLong(ERA); in until()
DJapaneseChronology.java61 import static java.time.temporal.ChronoField.ERA;
424 case ERA: in range()
440 Long eraLong = fieldValues.get(ERA); in resolveYearOfEra()
443 era = eraOf(range(ERA).checkValidIntValue(eraLong, ERA)); // always validated in resolveYearOfEra()
473 fieldValues.remove(ERA); in resolveYMD()
506 fieldValues.remove(ERA); in resolveYD()
DIsoChronology.java66 import static java.time.temporal.ChronoField.ERA;
514 Long era = fieldValues.remove(ERA); in resolveYearOfEra()
536 } else if (fieldValues.containsKey(ERA)) { in resolveYearOfEra()
537 ERA.checkValidValue(fieldValues.get(ERA)); // always validated in resolveYearOfEra()
DJapaneseEra.java65 import static java.time.temporal.ChronoField.ERA;
296 .appendText(ERA, style) in getDisplayName()
395 if (field == ERA) { in range()
396 return JapaneseChronology.INSTANCE.range(ERA); in range()
DJapaneseDate.java393 jcal.set(Calendar.ERA, era.getValue() + JapaneseEra.ERA_OFFSET); in lengthOfYear()
453 jcal.set(Calendar.ERA, era.getValue() + JapaneseEra.ERA_OFFSET); in range()
481 case ERA: in getLong()
486 jcal.set(Calendar.ERA, era.getValue() + JapaneseEra.ERA_OFFSET); in getLong()
524 case ERA: { in with()
531 case ERA: { in with()
DAbstractChronology.java72 import static java.time.temporal.ChronoField.ERA;
516 Long eraLong = fieldValues.remove(ERA); in resolveYearOfEra()
524 Era eraObj = eraOf(range(ERA).checkValidIntValue(eraLong, ERA)); in resolveYearOfEra()
545 } else if (fieldValues.containsKey(ERA)) { in resolveYearOfEra()
546 range(ERA).checkValidValue(fieldValues.get(ERA), ERA); // always validated in resolveYearOfEra() local
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/text/
DDataFormatFieldTest.java37 MyField field = new MyField("day of month", Calendar.ERA); in test_ConstructorLjava_lang_StringLjava_lang_String()
40 assertEquals("field has wrong Calendar field number", Calendar.ERA, in test_ConstructorLjava_lang_StringLjava_lang_String()
44 .ofCalendarField(Calendar.ERA); in test_ConstructorLjava_lang_StringLjava_lang_String()
46 DateFormat.Field.ERA, realField); in test_ConstructorLjava_lang_StringLjava_lang_String()
86 MyField field = new MyField("day of month", Calendar.ERA); in test_Constructor2()
89 assertEquals("field has wrong Calendar field number", Calendar.ERA, in test_Constructor2()
93 .ofCalendarField(Calendar.ERA); in test_Constructor2()
95 DateFormat.Field.ERA, realField); in test_Constructor2()
DFieldPositionTest.java99 FieldPosition fpos3 = new FieldPosition(DateFormat.Field.ERA, 1); in test_equalsLjava_lang_Object()
227 FieldPosition fpos2 = new FieldPosition(DateFormat.Field.ERA); in test_toString()
231 "java.text.FieldPosition[field=-1,attribute=" + DateFormat.Field.ERA in test_toString()
/libcore/ojluni/src/test/java/time/test/java/time/format/
DTestTextPrinter.java64 import static java.time.temporal.ChronoField.ERA;
185 {ERA, TextStyle.FULL, 0, "Before Christ"}, in provider_dow()
186 {ERA, TextStyle.FULL, 1, "Anno Domini"}, in provider_dow()
187 {ERA, TextStyle.SHORT, 0, "BC"}, in provider_dow()
188 {ERA, TextStyle.SHORT, 1, "AD"}, in provider_dow()
189 {ERA, TextStyle.NARROW, 0, "B"}, in provider_dow()
190 {ERA, TextStyle.NARROW, 1, "A"}, in provider_dow()
226 …{ERA, TextStyle.FULL, 2, "Heisei"}, // Note: CLDR doesn't define "wide" Japanese era nam… in provider_japaneseEra()
227 {ERA, TextStyle.SHORT, 2, "Heisei"}, in provider_japaneseEra()
228 {ERA, TextStyle.NARROW, 2, "H"}, in provider_japaneseEra()
/libcore/luni/src/test/java/libcore/java/time/
DYearMonthTest.java50 assertSame(ym, ym.with(ChronoField.ERA, IsoEra.CE.getValue())); in test_with_TemporalField_long()
51 assertSame(bceYm, bceYm.with(ChronoField.ERA, IsoEra.BCE.getValue())); in test_with_TemporalField_long()
53 assertEquals(bceYm, ym.with(ChronoField.ERA, IsoEra.BCE.getValue())); in test_with_TemporalField_long()
54 assertEquals(ym, bceYm.with(ChronoField.ERA, IsoEra.CE.getValue())); in test_with_TemporalField_long()
70 { ChronoField.ERA, -1 }, in test_with_TemporalField_long_invalidValue()
71 { ChronoField.ERA, 2 }, in test_with_TemporalField_long_invalidValue()
/libcore/ojluni/src/main/java/java/time/
DYear.java64 import static java.time.temporal.ChronoField.ERA;
364 return field == YEAR || field == YEAR_OF_ERA || field == ERA; in isSupported()
495 case ERA: return (year < 1 ? 0 : 1); in getLong()
620 case ERA: return (getLong(ERA) == newValue ? this : Year.of(1 - year)); in with()
709 case ERAS: return with(ERA, Math.addExact(getLong(ERA), amountToAdd)); in plus()
916 case ERAS: return end.getLong(ERA) - getLong(ERA); in until()
DYearMonth.java64 import static java.time.temporal.ChronoField.ERA;
351 field == PROLEPTIC_MONTH || field == YEAR_OF_ERA || field == ERA; in isSupported()
486 case ERA: return (year < 1 ? 0 : 1); in getLong()
685 case ERA: return (getLong(ERA) == newValue ? this : withYear(1 - year)); in with()
807 case ERAS: return with(ERA, Math.addExact(getLong(ERA), amountToAdd)); in plus()
1049 case ERAS: return end.getLong(ERA) - getLong(ERA); in until()
/libcore/ojluni/src/main/java/java/time/format/
DDateTimeTextProvider.java70 import static java.time.temporal.ChronoField.ERA;
173 if (field == ERA) { in getText()
174 fieldIndex = Calendar.ERA; in getText()
253 case ERA: in getTextIterator()
254 fieldIndex = Calendar.ERA; in getTextIterator()
277 case Calendar.ERA: in getTextIterator()
330 if (field == ERA) { in createStore()
337 "gregory", Calendar.ERA, textStyle.toCalendarStyle(), locale); in createStore()
/libcore/ojluni/src/main/java/java/time/temporal/
DChronoField.java561 ERA("Era", ERAS, FOREVER, ValueRange.of(0, 1), "era"), enumConstant
650 case ERA: in getIcuFieldNumber()
651 return DateTimePatternGenerator.ERA; in getIcuFieldNumber()
699 return ordinal() >= DAY_OF_WEEK.ordinal() && ordinal() <= ERA.ordinal(); in isDateBased()
/libcore/ojluni/src/main/java/sun/util/locale/provider/
DCalendarDataUtility.java105 if (field == Calendar.ERA) { in retrieveFieldValueName()
230 if (field == Calendar.ERA) { in retrieveFieldValueNamesImpl()
268 case Calendar.ERA: in getNames()
/libcore/ojluni/src/test/java/time/tck/java/time/temporal/serial/
DTCKChronoFieldSerialization.java86 import static java.time.temporal.ChronoField.ERA;
120 {ERA}, in data_fieldBased()
/libcore/ojluni/src/test/java/time/test/java/time/temporal/
DTestChronoField.java83 fieldMap.put(ChronoField.ERA, "era"); in initClass()
109 {ChronoField.ERA}, in data_localeDisplayNames()
/libcore/ojluni/src/main/java/java/util/
DJapaneseImperialCalendar.java259 LEAST_MAX_VALUES[ERA] = MAX_VALUES[ERA] = eras.length - 1;
422 set(ERA, getEraIndex(d)); in add()
430 set(ERA, getEraIndex(d)); in add()
434 } else if (field == ERA) { in add()
435 int era = internalGet(ERA) + amount; in add()
441 set(ERA, era); in add()
574 case ERA: in roll()
942 set(ERA, getEraIndex(d)); in roll()
995 && (getBaseStyle(style) != LONG || fieldValue != 1 || get(ERA) == 0)) { in getDisplayName()
1003 if (name == null && field == ERA && fieldValue < eras.length) { in getDisplayName()
[all …]

123