Home
last modified time | relevance | path

Searched refs:YEAR_OF_ERA (Results 1 – 25 of 53) sorted by relevance

123

/libcore/luni/src/test/java/libcore/java/time/chrono/
DThaiBuddhistChronologyTest.java50 case YEAR_OF_ERA: in test_range()
108 ThaiBuddhistDate.of(1, 1, 1).range(ChronoField.YEAR_OF_ERA)); in test_ThaiBuddhistDate_range_yeaOfEra()
110 ThaiBuddhistDate.of(-1, 1, 1).range(ChronoField.YEAR_OF_ERA)); in test_ThaiBuddhistDate_range_yeaOfEra()
116 assertEquals(10, date.getLong(ChronoField.YEAR_OF_ERA)); in test_ThaiBuddhistDate_getLong()
DMinguoChronologyTest.java50 case YEAR_OF_ERA: in test_range()
106 MinguoDate.of(1, 1, 1).range(ChronoField.YEAR_OF_ERA)); in test_MinguoDate_range_yeaOfEra()
108 MinguoDate.of(-1, 1, 1).range(ChronoField.YEAR_OF_ERA)); in test_MinguoDate_range_yeaOfEra()
114 assertEquals(10, date.getLong(ChronoField.YEAR_OF_ERA)); in test_MinguoDate_getLong()
DHijrahChronologyTest.java43 assertEquals(1300, date.getLong(ChronoField.YEAR_OF_ERA)); in test_HijrahDate_getLong()
/libcore/ojluni/src/main/java/java/time/chrono/
DJapaneseChronology.java64 import static java.time.temporal.ChronoField.YEAR_OF_ERA;
407 case YEAR_OF_ERA: { in range()
445 Long yoeLong = fieldValues.get(YEAR_OF_ERA); in resolveYearOfEra()
448 yoe = range(YEAR_OF_ERA).checkValidIntValue(yoeLong, YEAR_OF_ERA); // always validated in resolveYearOfEra()
474 fieldValues.remove(YEAR_OF_ERA); in resolveYMD()
497 if (result.getEra() != era && result.get(YEAR_OF_ERA) > 1 && yoe > 1) { in resolveYMD()
507 fieldValues.remove(YEAR_OF_ERA); in resolveYD()
DMinguoDate.java262 case YEAR_OF_ERA: { in range()
281 case YEAR_OF_ERA: { in getLong()
315 case YEAR_OF_ERA: in with()
320 case YEAR_OF_ERA: in with()
DThaiBuddhistDate.java262 case YEAR_OF_ERA: { in range()
281 case YEAR_OF_ERA: { in getLong()
315 case YEAR_OF_ERA: in with()
320 case YEAR_OF_ERA: in with()
DIsoChronology.java70 import static java.time.temporal.ChronoField.YEAR_OF_ERA;
509 Long yoeLong = fieldValues.remove(YEAR_OF_ERA); in resolveYearOfEra()
512 YEAR_OF_ERA.checkValidValue(yoeLong); in resolveYearOfEra()
523 fieldValues.put(YEAR_OF_ERA, yoeLong); in resolveYearOfEra()
DJapaneseDate.java450 case YEAR_OF_ERA: { in range()
479 case YEAR_OF_ERA: in getLong()
522 case YEAR_OF_ERA: in with()
527 case YEAR_OF_ERA: in with()
DAbstractChronology.java76 import static java.time.temporal.ChronoField.YEAR_OF_ERA;
514 Long yoeLong = fieldValues.remove(YEAR_OF_ERA); in resolveYearOfEra()
519 yoe = range(YEAR_OF_ERA).checkValidIntValue(yoeLong, YEAR_OF_ERA); in resolveYearOfEra()
534 fieldValues.put(YEAR_OF_ERA, yoeLong); in resolveYearOfEra()
DChronoLocalDateImpl.java63 import static java.time.temporal.ChronoField.YEAR_OF_ERA;
430 long yoe = getLong(YEAR_OF_ERA); in toString()
/libcore/luni/src/test/java/libcore/java/time/
DYearMonthTest.java55 assertEquals(YearMonth.of(1, Month.JANUARY), ym.with(ChronoField.YEAR_OF_ERA, 1)); in test_with_TemporalField_long()
57 assertEquals(YearMonth.of(0, Month.JANUARY), bceYm.with(ChronoField.YEAR_OF_ERA, 1)); in test_with_TemporalField_long()
66 { ChronoField.YEAR_OF_ERA, 0 }, in test_with_TemporalField_long_invalidValue()
67 { ChronoField.YEAR_OF_ERA, Year.MAX_VALUE + 1 }, in test_with_TemporalField_long_invalidValue()
/libcore/ojluni/src/test/java/time/tck/java/time/chrono/
DCopticDate.java64 import static java.time.temporal.ChronoField.YEAR_OF_ERA;
200 case YEAR_OF_ERA: return (prolepticYear <= 0 ? in range()
223 case YEAR_OF_ERA: return (prolepticYear >= 1 ? prolepticYear : 1 - prolepticYear); in getLong()
248 …case YEAR_OF_ERA: return resolvePreviousValid(prolepticYear >= 1 ? nvalue : 1 - nvalue, month, day… in with()
338 long yoe = getLong(YEAR_OF_ERA); in toString()
DTCKHijrahChronology.java229 fieldValues.put(ChronoField.YEAR_OF_ERA, 1343L); in test_resolve_yearOfEra_eraAndYearOfEraOnly_valid()
233 assertEquals(fieldValues.get(ChronoField.YEAR_OF_ERA), null); in test_resolve_yearOfEra_eraAndYearOfEraOnly_valid()
263 fieldValues.put(ChronoField.YEAR_OF_ERA, 1343L); in test_resolve_yearOfEra_yearOfEraOnly_valid()
266 …assertEquals(fieldValues.get(ChronoField.YEAR_OF_ERA), (style != ResolverStyle.STRICT) ? null : (L… in test_resolve_yearOfEra_yearOfEraOnly_valid()
274 fieldValues.put(ChronoField.YEAR_OF_ERA, 1343L); in test_resolve_yearOfEra_yearOfEraAndYearOnly_valid()
278 assertEquals(fieldValues.get(ChronoField.YEAR_OF_ERA), null); in test_resolve_yearOfEra_yearOfEraAndYearOnly_valid()
DTCKJapaneseChronology.java65 import static java.time.temporal.ChronoField.YEAR_OF_ERA;
476 assertEquals(base.getLong(YEAR_OF_ERA), 63L); in test_getLong()
490 test = test.with(YEAR_OF_ERA, 2); in test_with_TemporalField_long()
751 fieldValues.put(ChronoField.YEAR_OF_ERA, 1L); in test_resolve_yearOfEra_eraAndYearOfEraOnly_valid()
755 assertEquals(fieldValues.get(ChronoField.YEAR_OF_ERA), (Long) 1L); in test_resolve_yearOfEra_eraAndYearOfEraOnly_valid()
784 fieldValues.put(ChronoField.YEAR_OF_ERA, 1L); in test_resolve_yearOfEra_yearOfEraOnly_valid()
787 assertEquals(fieldValues.get(ChronoField.YEAR_OF_ERA), (Long) 1L); in test_resolve_yearOfEra_yearOfEraOnly_valid()
794 fieldValues.put(ChronoField.YEAR_OF_ERA, 1L); in test_resolve_yearOfEra_yearOfEraAndYearOnly_valid()
798 assertEquals(fieldValues.get(ChronoField.YEAR_OF_ERA), (Long) 1L); in test_resolve_yearOfEra_yearOfEraAndYearOnly_valid()
1173 fieldValues.put(ChronoField.YEAR_OF_ERA, (long) yoe); in test_resolve_eymd()
DCopticChronology.java237 case YEAR_OF_ERA: return ValueRange.of(1, 999, 1000); // TODO in range()
/libcore/ojluni/src/test/java/time/test/java/time/chrono/
DTestIsoChronoImpl.java62 import static java.time.temporal.ChronoField.YEAR_OF_ERA;
107 … assertEquals(isoDate.get(YEAR_OF_ERA), cal.get(Calendar.YEAR), "Year mismatch in " + isoDate); in test_IsoChrono_vsCalendar()
139 … assertEquals(isoDate.get(YEAR_OF_ERA), cal.get(Calendar.YEAR), "Year mismatch in " + isoDate); in test_DayOfWeek_IsoChronology_vsCalendar()
DTestThaiBuddhistChronoImpl.java110 …assertEquals(thaiDate.get(ChronoField.YEAR_OF_ERA), cal.get(Calendar.YEAR), "Year mismatch in " + … in test_ThaiBuddhistChrono_vsCalendar()
/libcore/ojluni/src/main/java/java/time/
DYear.java66 import static java.time.temporal.ChronoField.YEAR_OF_ERA;
364 return field == YEAR || field == YEAR_OF_ERA || field == ERA; in isSupported()
429 if (field == YEAR_OF_ERA) { in range()
493 case YEAR_OF_ERA: return (year < 1 ? 1 - year : year); in getLong()
618 case YEAR_OF_ERA: return Year.of((int) (year < 1 ? 1 - newValue : newValue)); in with()
DYearMonth.java68 import static java.time.temporal.ChronoField.YEAR_OF_ERA;
351 field == PROLEPTIC_MONTH || field == YEAR_OF_ERA || field == ERA; in isSupported()
417 if (field == YEAR_OF_ERA) { in range()
484 case YEAR_OF_ERA: return (year < 1 ? 1 - year : year); in getLong()
683 case YEAR_OF_ERA: return withYear((int) (year < 1 ? 1 - newValue : newValue)); in with()
/libcore/ojluni/src/test/java/time/tck/java/time/format/
DTCKResolverStyle.java112 builder.appendValue(ChronoField.YEAR_OF_ERA); in test_resolverStyle()
127 assertEquals(accessor.get(ChronoField.YEAR_OF_ERA), year); in test_resolverStyle()
DTCKLocalizedFieldParser.java62 import static java.time.temporal.ChronoField.YEAR_OF_ERA;
158 assertEquals(parsed.isSupported(YEAR_OF_ERA), true); in test_parse_textLocalDate()
/libcore/ojluni/src/test/java/time/tck/java/time/temporal/serial/
DTCKChronoFieldSerialization.java85 import static java.time.temporal.ChronoField.YEAR_OF_ERA;
118 {YEAR_OF_ERA}, in data_fieldBased()
/libcore/ojluni/src/test/java/time/tck/java/time/
DTestIsoChronology.java66 import static java.time.temporal.ChronoField.YEAR_OF_ERA;
190 assertEquals(test.get(ChronoField.YEAR_OF_ERA), year); in test_date_withEra()
196 assertEquals(test.get(YEAR_OF_ERA), year); in test_date_withEra()
DTCKYear.java64 import static java.time.temporal.ChronoField.YEAR_OF_ERA;
136 YEAR_OF_ERA, in validFields()
362 assertEquals(TEST_2008.isSupported(ChronoField.YEAR_OF_ERA), true); in test_isSupported_TemporalField()
398 assertEquals(TEST_2008.get(ChronoField.YEAR_OF_ERA), 2008); in test_get_TemporalField()
405 assertEquals(TEST_2008.getLong(ChronoField.YEAR_OF_ERA), 2008); in test_getLong_TemporalField()
799 assertEquals(result.get(ChronoField.YEAR_OF_ERA), 5); in test_with()
804 assertEquals(result.get(ChronoField.YEAR_OF_ERA), 10); in test_with()
806 result = base.with(ChronoField.YEAR_OF_ERA, 20); in test_with()
809 assertEquals(result.get(ChronoField.YEAR_OF_ERA), 20); in test_with()
/libcore/ojluni/src/test/java/time/test/java/time/format/
DTestReducedParser.java66 import static java.time.temporal.ChronoField.YEAR_OF_ERA;
380 assertParsed(parsed, YEAR_OF_ERA, Long.valueOf(year)); in test_parseAdjacent()
433 … = new DateTimeFormatterBuilder().appendValueReduced(YEAR_OF_ERA, 2, 2, LocalDate.of(2000, 1, 1)) in test_reducedWithChronoYearOfEra()
436 int expected = date.get(YEAR_OF_ERA); in test_reducedWithChronoYearOfEra()
441 int actual = parsed.get(YEAR_OF_ERA); in test_reducedWithChronoYearOfEra()

123