Home
last modified time | relevance | path

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

1234

/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;
155 if (field == ERA) { in range()
170 .appendText(ERA, style) in getDisplayName()
DThaiBuddhistEra.java64 import static java.time.temporal.ChronoField.ERA;
170 .appendText(ERA, style) in getDisplayName()
DMinguoEra.java64 import static java.time.temporal.ChronoField.ERA;
170 .appendText(ERA, style) in getDisplayName()
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()
DJapaneseEra.java65 import static java.time.temporal.ChronoField.ERA;
304 .appendText(ERA, style) in getDisplayName()
403 if (field == ERA) { in range()
404 return JapaneseChronology.INSTANCE.range(ERA); in range()
DIsoChronology.java65 import static java.time.temporal.ChronoField.ERA;
608 Long era = fieldValues.remove(ERA); in resolveYearOfEra()
630 } else if (fieldValues.containsKey(ERA)) { in resolveYearOfEra()
631 ERA.checkValidValue(fieldValues.get(ERA)); // always validated in resolveYearOfEra()
DJapaneseDate.java394 jcal.set(Calendar.ERA, era.getValue() + JapaneseEra.ERA_OFFSET); in lengthOfYear()
450 jcal.set(Calendar.ERA, era.getValue() + JapaneseEra.ERA_OFFSET); in range()
478 case ERA: in getLong()
483 jcal.set(Calendar.ERA, era.getValue() + JapaneseEra.ERA_OFFSET); in getLong()
520 case ERA: { in with()
527 case ERA: { in with()
/libcore/ojluni/src/test/java/time/tck/java/time/chrono/
DTCKJapaneseEra.java59 import static java.time.temporal.ChronoField.ERA;
131 assertEquals(era.range(ERA).getMinimum(), -1); in test_range()
132 assertEquals(era.range(ERA).getLargestMinimum(), -1); in test_range()
133 assertEquals(era.range(ERA).getSmallestMaximum(), era.range(ERA).getMaximum()); in test_range()
134 assertEquals(era.range(ERA).getMaximum() >= 2, true); in test_range()
DTCKHijrahEra.java59 import static java.time.temporal.ChronoField.ERA;
113 assertEquals(era.range(ERA), ValueRange.of(1, 1)); in test_range()
DTCKMinguoEra.java60 import static java.time.temporal.ChronoField.ERA;
117 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()
DTCKThaiBuddhistEra.java59 import static java.time.temporal.ChronoField.ERA;
116 assertEquals(era.range(ERA), ValueRange.of(0, 1)); in test_range()
/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/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/test/java/time/test/java/time/format/
DTestTextPrinter.java64 import static java.time.temporal.ChronoField.ERA;
183 {ERA, TextStyle.FULL, 0, "Before Christ"}, in provider_dow()
184 {ERA, TextStyle.FULL, 1, "Anno Domini"}, in provider_dow()
185 {ERA, TextStyle.SHORT, 0, "BC"}, in provider_dow()
186 {ERA, TextStyle.SHORT, 1, "AD"}, in provider_dow()
187 {ERA, TextStyle.NARROW, 0, "B"}, in provider_dow()
188 {ERA, TextStyle.NARROW, 1, "A"}, in provider_dow()
DTestTextPrinterWithLocale.java70 import static java.time.temporal.ChronoField.ERA;
151 …{ERA, TextStyle.FULL, 2, "Heisei"}, // Note: CLDR doesn't define "wide" Japanese era nam… in provider_japaneseEra()
152 {ERA, TextStyle.SHORT, 2, "Heisei"}, in provider_japaneseEra()
153 {ERA, TextStyle.NARROW, 2, "H"}, in provider_japaneseEra()
/libcore/ojluni/src/main/java/java/time/
DYear.java64 import static java.time.temporal.ChronoField.ERA;
365 return field == YEAR || field == YEAR_OF_ERA || field == ERA; in isSupported()
496 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;
352 field == PROLEPTIC_MONTH || field == YEAR_OF_ERA || field == ERA; in isSupported()
487 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/luni/src/test/java/libcore/java/time/chrono/
DEraTest.java23 import static java.time.temporal.ChronoField.ERA;
44 assertEquals(10, TestEra.INSTANCE.getLong(ERA)); in getLong_returnsValue_forEra()
49 EnumSet<ChronoField> unsupportedFields = EnumSet.complementOf(EnumSet.of(ERA)); in getLong_throws_forNonERA_chronoFields()
/libcore/ojluni/src/main/java/java/time/format/
DDateTimeTextProvider.java69 import static java.time.temporal.ChronoField.ERA;
177 if (field == ERA) { in getText()
178 fieldIndex = Calendar.ERA; in getText()
257 case ERA: in getTextIterator()
258 fieldIndex = Calendar.ERA; in getTextIterator()
281 case Calendar.ERA: in getTextIterator()
334 if (field == ERA) { in createStore()
341 "gregory", Calendar.ERA, textStyle.toCalendarStyle(), locale); in createStore()
/libcore/ojluni/src/main/java/java/time/temporal/
DChronoField.java584 ERA("Era", ERAS, FOREVER, ValueRange.of(0, 1), "era"), enumConstant
682 case ERA: in getIcuFieldNumber()
683 return DateTimePatternGenerator.ERA; in getIcuFieldNumber()
732 return ordinal() >= DAY_OF_WEEK.ordinal() && ordinal() <= ERA.ordinal(); in isDateBased()
/libcore/ojluni/src/main/java/sun/util/locale/provider/
DCalendarDataUtility.java143 if (field == Calendar.ERA) { in retrieveFieldValueName()
300 if (field == Calendar.ERA) { in retrieveFieldValueNamesImpl()
338 case Calendar.ERA: in getNames()

1234