/libcore/luni/src/test/java/libcore/java/time/ |
D | YearMonthTest.java | 24 import java.time.temporal.ChronoField; 45 assertEquals(YearMonth.of(1000, Month.JANUARY), ym.with(ChronoField.YEAR, 1000)); in test_with_TemporalField_long() 46 assertEquals(YearMonth.of(-1, Month.JANUARY), ym.with(ChronoField.YEAR, -1)); in test_with_TemporalField_long() 47 assertEquals(YearMonth.of(2000, Month.FEBRUARY), ym.with(ChronoField.MONTH_OF_YEAR, 2)); in test_with_TemporalField_long() 49 bceYm.with(ChronoField.MONTH_OF_YEAR, 12)); in test_with_TemporalField_long() 50 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() 55 assertEquals(YearMonth.of(1, Month.JANUARY), ym.with(ChronoField.YEAR_OF_ERA, 1)); in test_with_TemporalField_long() [all …]
|
D | ZoneOffsetTest.java | 20 import java.time.temporal.ChronoField; 38 for (ChronoField field : ChronoField.values()) { in test_isSupported() 41 field == ChronoField.OFFSET_SECONDS, OFFSET_P1.isSupported(field)); in test_isSupported() 47 assertEquals(ChronoField.OFFSET_SECONDS.range(), in test_range() 48 OFFSET_P1.range(ChronoField.OFFSET_SECONDS)); in test_range() 58 for (ChronoField field : ChronoField.values()) { in test_range_unsupported() 60 if (field == ChronoField.OFFSET_SECONDS) { in test_range_unsupported()
|
/libcore/ojluni/src/test/java/time/tck/java/time/temporal/serial/ |
D | TCKChronoFieldSerialization.java | 59 import static java.time.temporal.ChronoField.ALIGNED_DAY_OF_WEEK_IN_MONTH; 60 import static java.time.temporal.ChronoField.ALIGNED_DAY_OF_WEEK_IN_YEAR; 61 import static java.time.temporal.ChronoField.ALIGNED_WEEK_OF_MONTH; 62 import static java.time.temporal.ChronoField.ALIGNED_WEEK_OF_YEAR; 63 import static java.time.temporal.ChronoField.AMPM_OF_DAY; 64 import static java.time.temporal.ChronoField.CLOCK_HOUR_OF_AMPM; 65 import static java.time.temporal.ChronoField.CLOCK_HOUR_OF_DAY; 66 import static java.time.temporal.ChronoField.DAY_OF_MONTH; 67 import static java.time.temporal.ChronoField.DAY_OF_WEEK; 68 import static java.time.temporal.ChronoField.DAY_OF_YEAR; [all …]
|
/libcore/luni/src/test/java/libcore/java/time/chrono/ |
D | ThaiBuddhistChronologyTest.java | 23 import java.time.temporal.ChronoField; 41 for (ChronoField field : ChronoField.values()) { in test_range() 47 ChronoField.PROLEPTIC_MONTH.range().getMinimum() + YEARS_AHEAD * 12L, in test_range() 48 ChronoField.PROLEPTIC_MONTH.range().getMaximum() + YEARS_AHEAD * 12L); in test_range() 54 .of(1, -ChronoField.YEAR.range().getMinimum() + 1 - YEARS_AHEAD, in test_range() 55 ChronoField.YEAR.range().getMaximum() + YEARS_AHEAD); in test_range() 59 expected = ValueRange.of(ChronoField.YEAR.range().getMinimum() + YEARS_AHEAD, in test_range() 60 ChronoField.YEAR.range().getMaximum() + YEARS_AHEAD); in test_range() 95 assertEquals(LocalDate.from(date).range(ChronoField.DAY_OF_MONTH), in test_ThaiBuddhistDate_range() 96 date.range(ChronoField.DAY_OF_MONTH)); in test_ThaiBuddhistDate_range() [all …]
|
D | MinguoChronologyTest.java | 23 import java.time.temporal.ChronoField; 41 for (ChronoField field : ChronoField.values()) { in test_range() 47 ChronoField.PROLEPTIC_MONTH.range().getMinimum() - YEARS_BEHIND * 12L, in test_range() 48 ChronoField.PROLEPTIC_MONTH.range().getMaximum() - YEARS_BEHIND * 12L); in test_range() 53 … expected = ValueRange.of(1, ChronoField.YEAR.range().getMaximum() - YEARS_BEHIND, in test_range() 54 -ChronoField.YEAR.range().getMinimum() + 1 + YEARS_BEHIND); in test_range() 58 expected = ValueRange.of(ChronoField.YEAR.range().getMinimum() - YEARS_BEHIND, in test_range() 59 ChronoField.YEAR.range().getMaximum() - YEARS_BEHIND); in test_range() 93 assertEquals(LocalDate.from(date).range(ChronoField.DAY_OF_MONTH), in test_MinguoDate_range() 94 date.range(ChronoField.DAY_OF_MONTH)); in test_MinguoDate_range() [all …]
|
D | JapaneseChronologyTest.java | 33 import java.time.temporal.ChronoField; 85 assertEquals(false, date.isSupported(ChronoField.ALIGNED_DAY_OF_WEEK_IN_MONTH)); in test_JapaneseDate_isSupported_TemporalField() 86 assertEquals(false, date.isSupported(ChronoField.ALIGNED_DAY_OF_WEEK_IN_YEAR)); in test_JapaneseDate_isSupported_TemporalField() 87 assertEquals(false, date.isSupported(ChronoField.ALIGNED_WEEK_OF_MONTH)); in test_JapaneseDate_isSupported_TemporalField() 88 assertEquals(false, date.isSupported(ChronoField.ALIGNED_WEEK_OF_YEAR)); in test_JapaneseDate_isSupported_TemporalField() 89 assertEquals(false, date.isSupported(ChronoField.AMPM_OF_DAY)); in test_JapaneseDate_isSupported_TemporalField() 90 assertEquals(false, date.isSupported(ChronoField.CLOCK_HOUR_OF_AMPM)); in test_JapaneseDate_isSupported_TemporalField() 91 assertEquals(false, date.isSupported(ChronoField.CLOCK_HOUR_OF_DAY)); in test_JapaneseDate_isSupported_TemporalField() 92 assertEquals(true, date.isSupported(ChronoField.DAY_OF_MONTH)); in test_JapaneseDate_isSupported_TemporalField() 93 assertEquals(true, date.isSupported(ChronoField.DAY_OF_WEEK)); in test_JapaneseDate_isSupported_TemporalField() [all …]
|
D | HijrahChronologyTest.java | 22 import java.time.temporal.ChronoField; 43 assertEquals(1300, date.getLong(ChronoField.YEAR_OF_ERA)); in test_HijrahDate_getLong() 44 assertEquals(1300, date.getLong(ChronoField.YEAR)); in test_HijrahDate_getLong() 45 assertEquals(2, date.getLong(ChronoField.MONTH_OF_YEAR)); in test_HijrahDate_getLong() 47 assertEquals(1300 * 12 + 2 - 1, date.getLong(ChronoField.PROLEPTIC_MONTH)); in test_HijrahDate_getLong() 48 assertEquals(5, date.getLong(ChronoField.DAY_OF_MONTH)); in test_HijrahDate_getLong() 50 assertEquals(30 + 5, date.getLong(ChronoField.DAY_OF_YEAR)); in test_HijrahDate_getLong() 51 assertEquals(date.toEpochDay(), date.getLong(ChronoField.EPOCH_DAY)); in test_HijrahDate_getLong()
|
/libcore/ojluni/src/test/java/time/test/java/time/temporal/ |
D | TestChronoField.java | 62 import java.time.temporal.ChronoField; 77 Map<ChronoField, String> fieldMap; 83 fieldMap.put(ChronoField.ERA, "era"); in initClass() 84 fieldMap.put(ChronoField.YEAR, "year"); in initClass() 85 fieldMap.put(ChronoField.MONTH_OF_YEAR, "month"); in initClass() 86 fieldMap.put(ChronoField.DAY_OF_MONTH, "day"); in initClass() 87 fieldMap.put(ChronoField.AMPM_OF_DAY, "dayperiod"); in initClass() 88 fieldMap.put(ChronoField.ALIGNED_WEEK_OF_YEAR, "week"); in initClass() 89 fieldMap.put(ChronoField.DAY_OF_WEEK, "weekday"); in initClass() 90 fieldMap.put(ChronoField.HOUR_OF_DAY, "hour"); in initClass() [all …]
|
D | TestDateTimeBuilderCombinations.java | 62 import static java.time.temporal.ChronoField.ALIGNED_DAY_OF_WEEK_IN_MONTH; 63 import static java.time.temporal.ChronoField.ALIGNED_DAY_OF_WEEK_IN_YEAR; 64 import static java.time.temporal.ChronoField.ALIGNED_WEEK_OF_MONTH; 65 import static java.time.temporal.ChronoField.ALIGNED_WEEK_OF_YEAR; 66 import static java.time.temporal.ChronoField.DAY_OF_MONTH; 67 import static java.time.temporal.ChronoField.DAY_OF_WEEK; 68 import static java.time.temporal.ChronoField.DAY_OF_YEAR; 69 import static java.time.temporal.ChronoField.EPOCH_DAY; 70 import static java.time.temporal.ChronoField.MONTH_OF_YEAR; 71 import static java.time.temporal.ChronoField.PROLEPTIC_MONTH; [all …]
|
/libcore/ojluni/src/test/java/time/tck/java/time/temporal/ |
D | TCKChronoField.java | 59 import static java.time.temporal.ChronoField.ALIGNED_DAY_OF_WEEK_IN_MONTH; 60 import static java.time.temporal.ChronoField.ALIGNED_DAY_OF_WEEK_IN_YEAR; 61 import static java.time.temporal.ChronoField.ALIGNED_WEEK_OF_MONTH; 62 import static java.time.temporal.ChronoField.ALIGNED_WEEK_OF_YEAR; 63 import static java.time.temporal.ChronoField.AMPM_OF_DAY; 64 import static java.time.temporal.ChronoField.CLOCK_HOUR_OF_DAY; 65 import static java.time.temporal.ChronoField.CLOCK_HOUR_OF_AMPM; 66 import static java.time.temporal.ChronoField.DAY_OF_MONTH; 67 import static java.time.temporal.ChronoField.DAY_OF_WEEK; 68 import static java.time.temporal.ChronoField.DAY_OF_YEAR; [all …]
|
/libcore/ojluni/src/test/java/time/tck/java/time/ |
D | TCKDayOfWeek.java | 65 import static java.time.temporal.ChronoField.DAY_OF_WEEK; 74 import java.time.temporal.ChronoField; 118 … List<TemporalField> list = new ArrayList<>(Arrays.<TemporalField>asList(ChronoField.values())); in invalidFields() 168 assertEquals(DayOfWeek.THURSDAY.isSupported(ChronoField.NANO_OF_SECOND), false); in test_isSupported_TemporalField() 169 assertEquals(DayOfWeek.THURSDAY.isSupported(ChronoField.NANO_OF_DAY), false); in test_isSupported_TemporalField() 170 assertEquals(DayOfWeek.THURSDAY.isSupported(ChronoField.MICRO_OF_SECOND), false); in test_isSupported_TemporalField() 171 assertEquals(DayOfWeek.THURSDAY.isSupported(ChronoField.MICRO_OF_DAY), false); in test_isSupported_TemporalField() 172 assertEquals(DayOfWeek.THURSDAY.isSupported(ChronoField.MILLI_OF_SECOND), false); in test_isSupported_TemporalField() 173 assertEquals(DayOfWeek.THURSDAY.isSupported(ChronoField.MILLI_OF_DAY), false); in test_isSupported_TemporalField() 174 assertEquals(DayOfWeek.THURSDAY.isSupported(ChronoField.SECOND_OF_MINUTE), false); in test_isSupported_TemporalField() [all …]
|
D | TCKMonth.java | 62 import static java.time.temporal.ChronoField.MONTH_OF_YEAR; 71 import java.time.temporal.ChronoField; 111 … List<TemporalField> list = new ArrayList<>(Arrays.<TemporalField>asList(ChronoField.values())); in invalidFields() 160 assertEquals(Month.AUGUST.isSupported(ChronoField.NANO_OF_SECOND), false); in test_isSupported_TemporalField() 161 assertEquals(Month.AUGUST.isSupported(ChronoField.NANO_OF_DAY), false); in test_isSupported_TemporalField() 162 assertEquals(Month.AUGUST.isSupported(ChronoField.MICRO_OF_SECOND), false); in test_isSupported_TemporalField() 163 assertEquals(Month.AUGUST.isSupported(ChronoField.MICRO_OF_DAY), false); in test_isSupported_TemporalField() 164 assertEquals(Month.AUGUST.isSupported(ChronoField.MILLI_OF_SECOND), false); in test_isSupported_TemporalField() 165 assertEquals(Month.AUGUST.isSupported(ChronoField.MILLI_OF_DAY), false); in test_isSupported_TemporalField() 166 assertEquals(Month.AUGUST.isSupported(ChronoField.SECOND_OF_MINUTE), false); in test_isSupported_TemporalField() [all …]
|
D | TCKMonthDay.java | 62 import static java.time.temporal.ChronoField.DAY_OF_MONTH; 63 import static java.time.temporal.ChronoField.MONTH_OF_YEAR; 85 import java.time.temporal.ChronoField; 135 … List<TemporalField> list = new ArrayList<>(Arrays.<TemporalField>asList(ChronoField.values())); in invalidFields() 382 assertEquals(TEST_07_15.isSupported(ChronoField.NANO_OF_SECOND), false); in test_isSupported_TemporalField() 383 assertEquals(TEST_07_15.isSupported(ChronoField.NANO_OF_DAY), false); in test_isSupported_TemporalField() 384 assertEquals(TEST_07_15.isSupported(ChronoField.MICRO_OF_SECOND), false); in test_isSupported_TemporalField() 385 assertEquals(TEST_07_15.isSupported(ChronoField.MICRO_OF_DAY), false); in test_isSupported_TemporalField() 386 assertEquals(TEST_07_15.isSupported(ChronoField.MILLI_OF_SECOND), false); in test_isSupported_TemporalField() 387 assertEquals(TEST_07_15.isSupported(ChronoField.MILLI_OF_DAY), false); in test_isSupported_TemporalField() [all …]
|
D | TCKOffsetDateTime.java | 63 import static java.time.temporal.ChronoField.ALIGNED_DAY_OF_WEEK_IN_MONTH; 64 import static java.time.temporal.ChronoField.ALIGNED_DAY_OF_WEEK_IN_YEAR; 65 import static java.time.temporal.ChronoField.ALIGNED_WEEK_OF_MONTH; 66 import static java.time.temporal.ChronoField.ALIGNED_WEEK_OF_YEAR; 67 import static java.time.temporal.ChronoField.AMPM_OF_DAY; 68 import static java.time.temporal.ChronoField.CLOCK_HOUR_OF_AMPM; 69 import static java.time.temporal.ChronoField.CLOCK_HOUR_OF_DAY; 70 import static java.time.temporal.ChronoField.DAY_OF_MONTH; 71 import static java.time.temporal.ChronoField.DAY_OF_WEEK; 72 import static java.time.temporal.ChronoField.DAY_OF_YEAR; [all …]
|
D | TCKYear.java | 62 import static java.time.temporal.ChronoField.ERA; 63 import static java.time.temporal.ChronoField.YEAR; 64 import static java.time.temporal.ChronoField.YEAR_OF_ERA; 95 import java.time.temporal.ChronoField; 145 … List<TemporalField> list = new ArrayList<>(Arrays.<TemporalField>asList(ChronoField.values())); in invalidFields() 336 assertEquals(TEST_2008.isSupported(ChronoField.NANO_OF_SECOND), false); in test_isSupported_TemporalField() 337 assertEquals(TEST_2008.isSupported(ChronoField.NANO_OF_DAY), false); in test_isSupported_TemporalField() 338 assertEquals(TEST_2008.isSupported(ChronoField.MICRO_OF_SECOND), false); in test_isSupported_TemporalField() 339 assertEquals(TEST_2008.isSupported(ChronoField.MICRO_OF_DAY), false); in test_isSupported_TemporalField() 340 assertEquals(TEST_2008.isSupported(ChronoField.MILLI_OF_SECOND), false); in test_isSupported_TemporalField() [all …]
|
D | TCKOffsetTime.java | 62 import static java.time.temporal.ChronoField.AMPM_OF_DAY; 63 import static java.time.temporal.ChronoField.CLOCK_HOUR_OF_AMPM; 64 import static java.time.temporal.ChronoField.CLOCK_HOUR_OF_DAY; 65 import static java.time.temporal.ChronoField.HOUR_OF_AMPM; 66 import static java.time.temporal.ChronoField.HOUR_OF_DAY; 67 import static java.time.temporal.ChronoField.MICRO_OF_DAY; 68 import static java.time.temporal.ChronoField.MICRO_OF_SECOND; 69 import static java.time.temporal.ChronoField.MILLI_OF_DAY; 70 import static java.time.temporal.ChronoField.MILLI_OF_SECOND; 71 import static java.time.temporal.ChronoField.MINUTE_OF_DAY; [all …]
|
/libcore/ojluni/src/test/java/time/tck/java/time/chrono/ |
D | TCKIsoChronology.java | 71 import java.time.temporal.ChronoField; 154 if (field == ChronoField.EPOCH_DAY) { in test_date_TemporalAccessor() 162 if (field == ChronoField.EPOCH_DAY) { in test_date_TemporalAccessor() 190 if (field == ChronoField.EPOCH_DAY || field == ChronoField.NANO_OF_DAY) { in test_localDateTime_TemporalAccessor() 198 if (field == ChronoField.EPOCH_DAY) { in test_localDateTime_TemporalAccessor() 201 if (field == ChronoField.NANO_OF_DAY) { in test_localDateTime_TemporalAccessor() 232 if (field == ChronoField.EPOCH_DAY || field == ChronoField.NANO_OF_DAY || in test_zonedDateTime_TemporalAccessor() 233 … field == ChronoField.INSTANT_SECONDS || field == ChronoField.NANO_OF_SECOND) { in test_zonedDateTime_TemporalAccessor() 241 if (field == ChronoField.INSTANT_SECONDS) { in test_zonedDateTime_TemporalAccessor() 244 if (field == ChronoField.NANO_OF_SECOND) { in test_zonedDateTime_TemporalAccessor() [all …]
|
D | CopticDate.java | 58 import static java.time.temporal.ChronoField.ALIGNED_DAY_OF_WEEK_IN_MONTH; 59 import static java.time.temporal.ChronoField.ALIGNED_DAY_OF_WEEK_IN_YEAR; 60 import static java.time.temporal.ChronoField.ALIGNED_WEEK_OF_MONTH; 61 import static java.time.temporal.ChronoField.ALIGNED_WEEK_OF_YEAR; 62 import static java.time.temporal.ChronoField.DAY_OF_MONTH; 63 import static java.time.temporal.ChronoField.MONTH_OF_YEAR; 64 import static java.time.temporal.ChronoField.YEAR_OF_ERA; 73 import java.time.temporal.ChronoField; 192 if (field instanceof ChronoField) { in range() 194 ChronoField f = (ChronoField) field; in range() [all …]
|
D | TCKThaiBuddhistChronology.java | 59 import static java.time.temporal.ChronoField.DAY_OF_MONTH; 60 import static java.time.temporal.ChronoField.DAY_OF_YEAR; 61 import static java.time.temporal.ChronoField.MONTH_OF_YEAR; 62 import static java.time.temporal.ChronoField.YEAR; 63 import static java.time.temporal.ChronoField.YEAR_OF_ERA; 89 import java.time.temporal.ChronoField; 316 … jdate = jdate.with(ChronoField.YEAR, expectedProlepticYear).with(ChronoField.MONTH_OF_YEAR, 2); in test_isLeapYear() 403 ThaiBuddhistDate test = base.with(ChronoField.ERA, ThaiBuddhistEra.BE.getValue()); in test_withEra_BE() 410 ThaiBuddhistDate test = base.with(ChronoField.ERA, ThaiBuddhistEra.BEFORE_BE.getValue()); in test_withEra_BBE() 417 ThaiBuddhistDate test = base.with(ChronoField.ERA, ThaiBuddhistEra.BE.getValue()); in test_withEra_swap() [all …]
|
D | TCKHijrahChronology.java | 76 import java.time.temporal.ChronoField; 218 fieldValues.put(ChronoField.ERA, (long) era.getValue()); in test_resolve_yearOfEra_eraOnly_valid() 221 assertEquals(fieldValues.get(ChronoField.ERA), (Long) (long) era.getValue()); in test_resolve_yearOfEra_eraOnly_valid() 228 fieldValues.put(ChronoField.ERA, (long) era.getValue()); in test_resolve_yearOfEra_eraAndYearOfEraOnly_valid() 229 fieldValues.put(ChronoField.YEAR_OF_ERA, 1343L); in test_resolve_yearOfEra_eraAndYearOfEraOnly_valid() 232 assertEquals(fieldValues.get(ChronoField.ERA), null); in test_resolve_yearOfEra_eraAndYearOfEraOnly_valid() 233 assertEquals(fieldValues.get(ChronoField.YEAR_OF_ERA), null); in test_resolve_yearOfEra_eraAndYearOfEraOnly_valid() 234 assertEquals(fieldValues.get(ChronoField.YEAR), (Long) 1343L); in test_resolve_yearOfEra_eraAndYearOfEraOnly_valid() 241 fieldValues.put(ChronoField.ERA, (long) era.getValue()); in test_resolve_yearOfEra_eraAndYearOnly_valid() 242 fieldValues.put(ChronoField.YEAR, 1343L); in test_resolve_yearOfEra_eraAndYearOnly_valid() [all …]
|
D | TCKMinguoChronology.java | 90 import java.time.temporal.ChronoField; 309 … minguo = minguo.with(ChronoField.YEAR, expectedProlepticYear).with(ChronoField.MONTH_OF_YEAR, 2); in test_isLeapYear() 563 {ResolverStyle.STRICT, 0, null, null, ChronoField.ERA, 0}, in data_resolve_yearOfEra() 564 {ResolverStyle.SMART, 0, null, null, ChronoField.ERA, 0}, in data_resolve_yearOfEra() 565 {ResolverStyle.LENIENT, 0, null, null, ChronoField.ERA, 0}, in data_resolve_yearOfEra() 567 {ResolverStyle.STRICT, 1, null, null, ChronoField.ERA, 1}, in data_resolve_yearOfEra() 568 {ResolverStyle.SMART, 1, null, null, ChronoField.ERA, 1}, in data_resolve_yearOfEra() 569 {ResolverStyle.LENIENT, 1, null, null, ChronoField.ERA, 1}, in data_resolve_yearOfEra() 580 {ResolverStyle.STRICT, 0, 2012, null, ChronoField.YEAR, -2011}, in data_resolve_yearOfEra() 581 {ResolverStyle.SMART, 0, 2012, null, ChronoField.YEAR, -2011}, in data_resolve_yearOfEra() [all …]
|
/libcore/ojluni/src/test/java/time/test/java/time/chrono/ |
D | TestExampleCode.java | 72 import java.time.temporal.ChronoField; 90 int day = now1.get(ChronoField.DAY_OF_MONTH); in test_chronoPackageExample() 91 int dow = now1.get(ChronoField.DAY_OF_WEEK); in test_chronoPackageExample() 92 int month = now1.get(ChronoField.MONTH_OF_YEAR); in test_chronoPackageExample() 93 int year = now1.get(ChronoField.YEAR); in test_chronoPackageExample() 106 .with(ChronoField.DAY_OF_MONTH, 1) in test_chronoPackageExample() 107 .with(ChronoField.MONTH_OF_YEAR, 1); in test_chronoPackageExample() 150 int day = now1.get(ChronoField.DAY_OF_MONTH); in test_calendarPackageExample() 151 int dow = now1.get(ChronoField.DAY_OF_WEEK); in test_calendarPackageExample() 152 int month = now1.get(ChronoField.MONTH_OF_YEAR); in test_calendarPackageExample() [all …]
|
D | TestThaiBuddhistChronoImpl.java | 64 import java.time.temporal.ChronoField; 103 cal.set(Calendar.YEAR, thaiDate.get(ChronoField.YEAR)); in test_ThaiBuddhistChrono_vsCalendar() 104 cal.set(Calendar.MONTH, thaiDate.get(ChronoField.MONTH_OF_YEAR) - 1); in test_ThaiBuddhistChrono_vsCalendar() 105 cal.set(Calendar.DAY_OF_MONTH, thaiDate.get(ChronoField.DAY_OF_MONTH)); in test_ThaiBuddhistChrono_vsCalendar() 108 …assertEquals(thaiDate.get(ChronoField.DAY_OF_MONTH), cal.get(Calendar.DAY_OF_MONTH), "Day mismatch… in test_ThaiBuddhistChrono_vsCalendar() 109 …assertEquals(thaiDate.get(ChronoField.MONTH_OF_YEAR), cal.get(Calendar.MONTH) + 1, "Month mismatch… in test_ThaiBuddhistChrono_vsCalendar() 110 …assertEquals(thaiDate.get(ChronoField.YEAR_OF_ERA), cal.get(Calendar.YEAR), "Year mismatch in " + … in test_ThaiBuddhistChrono_vsCalendar()
|
/libcore/ojluni/src/test/java/time/tck/java/time/format/ |
D | TCKResolverStyle.java | 66 import java.time.temporal.ChronoField; 112 builder.appendValue(ChronoField.YEAR_OF_ERA); in test_resolverStyle() 114 builder.appendValue(ChronoField.MONTH_OF_YEAR); in test_resolverStyle() 116 builder.appendValue(ChronoField.DAY_OF_MONTH); in test_resolverStyle() 121 …rmatter = new DateTimeFormatterBuilder().appendLiteral(" ").appendText(ChronoField.ERA, eraMap).to… in test_resolverStyle() 127 assertEquals(accessor.get(ChronoField.YEAR_OF_ERA), year); in test_resolverStyle() 128 assertEquals(accessor.get(ChronoField.MONTH_OF_YEAR), month); in test_resolverStyle() 129 assertEquals(accessor.get(ChronoField.DAY_OF_MONTH), day); in test_resolverStyle()
|
/libcore/ojluni/src/main/java/java/time/chrono/ |
D | ChronoLocalDateTimeImpl.java | 64 import static java.time.temporal.ChronoField.EPOCH_DAY; 74 import java.time.temporal.ChronoField; 240 if (field instanceof ChronoField) { in isSupported() 241 ChronoField f = (ChronoField) field; in isSupported() 249 if (field instanceof ChronoField) { in range() 250 ChronoField f = (ChronoField) field; in range() 258 if (field instanceof ChronoField) { in get() 259 ChronoField f = (ChronoField) field; in get() 267 if (field instanceof ChronoField) { in getLong() 268 ChronoField f = (ChronoField) field; in getLong() [all …]
|