Home
last modified time | relevance | path

Searched refs:NANO_OF_SECOND (Results 1 – 25 of 26) sorted by relevance

12

/libcore/ojluni/src/test/java/time/test/java/time/format/
DTestFractionPrinterParser.java62 import static java.time.temporal.ChronoField.NANO_OF_SECOND;
93 getFormatter(NANO_OF_SECOND, 0, 9, true).formatTo(EMPTY_DTA, buf); in test_print_emptyCalendrical()
98 getFormatter(NANO_OF_SECOND, 0, 9, true).formatTo(LocalTime.of(12, 30, 40, 3), buf); in test_print_append()
181 …getFormatter(NANO_OF_SECOND, minWidth, maxWidth, true).formatTo(new MockFieldValue(NANO_OF_SECOND in test_print_nanos()
190 …getFormatter(NANO_OF_SECOND, minWidth, maxWidth, false).formatTo(new MockFieldValue(NANO_OF_SECON… in test_print_nanos_noDecimalPoint()
246 …TemporalAccessor parsed = getFormatter(NANO_OF_SECOND, minWidth, maxWidth, true).parseUnresolved(r… in test_reverseParse()
248 … assertParsed(parsed, NANO_OF_SECOND, value == 0 && minWidth == 0 ? null : (long) expectedValue); in test_reverseParse()
254 …TemporalAccessor parsed = getFormatter(NANO_OF_SECOND, minWidth, maxWidth, false).parseUnresolved(… in test_reverseParse_noDecimalPoint()
257 … assertParsed(parsed, NANO_OF_SECOND, value == 0 && minWidth == 0 ? null : (long) expectedValue); in test_reverseParse_noDecimalPoint()
264 …TemporalAccessor parsed = getFormatter(NANO_OF_SECOND, minWidth, maxWidth, true).parseUnresolved(r… in test_reverseParse_followedByNonDigit()
[all …]
DTestDateTimeParsing.java66 import static java.time.temporal.ChronoField.NANO_OF_SECOND;
113 .appendValue(INSTANT_SECONDS).appendLiteral('.').appendValue(NANO_OF_SECOND).toFormatter();
160 assertEquals(actual.isSupported(NANO_OF_SECOND), true); in test_parse_instantZones_supported()
199 assertEquals(actual.isSupported(NANO_OF_SECOND), true); in test_parse_instantNoZone_supported()
/libcore/ojluni/src/test/java/time/tck/java/time/temporal/
DTCKChronoField.java80 import static java.time.temporal.ChronoField.NANO_OF_SECOND;
139 {NANO_OF_SECOND, NANOS, SECONDS}, in data_fieldUnit()
185 {NANO_OF_SECOND, false, true}, in data_fieldBased()
223 {NANO_OF_SECOND, LocalTime.of(5, 4, 3, 200), true, 200}, in data_fieldAndAccessor()
224 {NANO_OF_SECOND, LocalDateTime.of(2000, 2, 29, 5, 4, 3, 200), true, 200}, in data_fieldAndAccessor()
235 {NANO_OF_SECOND, LocalDate.of(2000, 2, 29), false, -1}, in data_fieldAndAccessor()
/libcore/ojluni/src/test/java/time/tck/java/time/format/
DTCKDateTimeParseResolver.java88 import static java.time.temporal.ChronoField.NANO_OF_SECOND;
175 {YEAR, 2012, NANO_OF_SECOND, 5}, in data_resolveTwoNoChange()
184 {MONTH_OF_YEAR, 5, NANO_OF_SECOND, 5}, in data_resolveTwoNoChange()
214 {HOUR_OF_DAY, 1, SECOND_OF_MINUTE, 5, NANO_OF_SECOND, 5}, in data_resolveThreeNoChange()
215 {MINUTE_OF_HOUR, 1, SECOND_OF_MINUTE, 5, NANO_OF_SECOND, 5}, in data_resolveThreeNoChange()
249 {MICRO_OF_SECOND, 12, NANO_OF_SECOND, 12_000L, null, null}, in data_resolveOneToField()
250 {MILLI_OF_SECOND, 12, NANO_OF_SECOND, 12_000_000L, null, null}, in data_resolveOneToField()
435 {SECOND_OF_DAY, 3600 + 650, NANO_OF_SECOND, 2, LocalTime.of(1, 10, 50, 2)}, in data_resolveTwoToTime()
443 …{MILLI_OF_DAY, (3600 + 650) * 1000L + 2, NANO_OF_SECOND, 2_000_004, LocalTime.of(1, 10, 50, 2_000_… in data_resolveTwoToTime()
451 …{MICRO_OF_DAY, (3600 + 650) * 1000_000L + 2, NANO_OF_SECOND, 2_004, LocalTime.of(1, 10, 50, 2_004)… in data_resolveTwoToTime()
[all …]
DTCKDateTimeFormatterBuilder.java66 import static java.time.temporal.ChronoField.NANO_OF_SECOND;
808 …dValue(HOUR_OF_DAY, 2).appendValue(MINUTE_OF_HOUR, 2).appendFraction(NANO_OF_SECOND, 0, 3, false).… in test_adjacent_strict_fractionFollows()
815 assertEquals(parsed.getLong(NANO_OF_SECOND), 567_000_000L); in test_adjacent_strict_fractionFollows()
821 …dValue(HOUR_OF_DAY, 2).appendValue(MINUTE_OF_HOUR, 2).appendFraction(NANO_OF_SECOND, 0, 3, false).… in test_adjacent_strict_fractionFollows_2digit()
828 assertEquals(parsed.getLong(NANO_OF_SECOND), 560_000_000L); in test_adjacent_strict_fractionFollows_2digit()
834 …dValue(HOUR_OF_DAY, 2).appendValue(MINUTE_OF_HOUR, 2).appendFraction(NANO_OF_SECOND, 0, 3, false).… in test_adjacent_strict_fractionFollows_0digit()
846 …dValue(HOUR_OF_DAY, 2).appendValue(MINUTE_OF_HOUR, 2).appendFraction(NANO_OF_SECOND, 3, 3, false).… in test_adjacent_lenient_fractionFollows()
853 assertEquals(parsed.getLong(NANO_OF_SECOND), 567_000_000L); in test_adjacent_lenient_fractionFollows()
859 …dValue(HOUR_OF_DAY, 2).appendValue(MINUTE_OF_HOUR, 2).appendFraction(NANO_OF_SECOND, 3, 3, false).… in test_adjacent_lenient_fractionFollows_2digit()
866 assertEquals(parsed.getLong(NANO_OF_SECOND), 560_000_000L); in test_adjacent_lenient_fractionFollows_2digit()
[all …]
DTCKDateTimeFormatters.java69 import static java.time.temporal.ChronoField.NANO_OF_SECOND;
1228 assertEquals(parsed.getLong(NANO_OF_SECOND), (nano == null ? 0 : nano)); in test_parse_isoInstant()
1306 test.fieldValues.put(NANO_OF_SECOND, (long) nano); in createTime()
1334 test.fieldValues.put(NANO_OF_SECOND, (long) nano); in createDateTime()
1363 mock.fields.put(NANO_OF_SECOND, (long) nano); in buildAccessor()
1390 mock.fields.put(NANO_OF_SECOND, (long) nano); in buildAccessorInstant()
1442 fields.put(NANO_OF_SECOND, (long) dt.getNano()); in setFields()
/libcore/ojluni/src/main/java/java/time/
DInstant.java71 import static java.time.temporal.ChronoField.NANO_OF_SECOND;
368 int nanoOfSecond = temporal.get(NANO_OF_SECOND); in from()
453 …return field == INSTANT_SECONDS || field == NANO_OF_SECOND || field == MICRO_OF_SECOND || field ==… in isSupported()
555 case NANO_OF_SECOND: return nanos; in get()
592 case NANO_OF_SECOND: return nanos; in getLong()
711 … case NANO_OF_SECOND: return (newValue != nanos ? create(seconds, (int) newValue) : this); in with()
1089 return temporal.with(INSTANT_SECONDS, seconds).with(NANO_OF_SECOND, nanos); in adjustInto()
DLocalTime.java68 import static java.time.temporal.ChronoField.NANO_OF_SECOND;
337 NANO_OF_SECOND.checkValidValue(nanoOfSecond); in of()
680 case NANO_OF_SECOND: return nano; in get0()
855 case NANO_OF_SECOND: return withNano((int) newValue); in with()
941 NANO_OF_SECOND.checkValidValue(nanoOfSecond); in withNano()
DDuration.java70 import static java.time.temporal.ChronoField.NANO_OF_SECOND;
474 … nanos = endExclusive.getLong(NANO_OF_SECOND) - startInclusive.getLong(NANO_OF_SECOND); in between()
657 NANO_OF_SECOND.checkValidIntValue(nanoOfSecond); in withNanos()
DLocalDateTime.java73 import static java.time.temporal.ChronoField.NANO_OF_SECOND;
412 NANO_OF_SECOND.checkValidValue(nanoOfSecond); in ofEpochSecond()
/libcore/ojluni/src/test/java/time/tck/java/time/temporal/serial/
DTCKChronoFieldSerialization.java80 import static java.time.temporal.ChronoField.NANO_OF_SECOND;
136 {NANO_OF_SECOND}, in data_fieldBased()
/libcore/ojluni/src/test/java/time/tck/java/time/
DTCKLocalTime.java74 import static java.time.temporal.ChronoField.NANO_OF_SECOND;
170 NANO_OF_SECOND, in validFields()
598 assertEquals(TEST_12_30_40_987654321.isSupported(ChronoField.NANO_OF_SECOND), true); in test_isSupported_TemporalField()
663 assertEquals(test.get(ChronoField.NANO_OF_SECOND), 987654321); in test_get_TemporalField()
679 assertEquals(test.getLong(ChronoField.NANO_OF_SECOND), 987654321); in test_getLong_TemporalField()
841 LocalTime test = TEST_12_30_40_987654321.with(NANO_OF_SECOND, i); in test_with_longTemporalField_nanoOfSecond()
842 assertEquals(test.get(NANO_OF_SECOND), i); in test_with_longTemporalField_nanoOfSecond()
866 assertEquals(test.get(NANO_OF_SECOND), i * 1_000); in test_with_longTemporalField_microOfSecond()
891 assertEquals(test.get(NANO_OF_SECOND), i * 1_000_000); in test_with_longTemporalField_milliOfSecond()
918 assertEquals(test.get(NANO_OF_SECOND), TEST_12_30_40_987654321.get(NANO_OF_SECOND)); in test_with_longTemporalField_secondOfMinute()
[all …]
DTCKInstant.java65 import static java.time.temporal.ChronoField.NANO_OF_SECOND;
144 NANO_OF_SECOND, in validFields()
388 assertEquals(test.get(ChronoField.NANO_OF_SECOND), 123456789);
396 assertEquals(test.getLong(ChronoField.NANO_OF_SECOND), 123456789);
516 …{Instant.ofEpochSecond(10, 200), ChronoField.NANO_OF_SECOND, 100, Instant.ofEpochSecond(10, 100), …
517 … {Instant.ofEpochSecond(10, 200), ChronoField.NANO_OF_SECOND, 0, Instant.ofEpochSecond(10), null},
523 …{Instant.ofEpochSecond(10, 200), ChronoField.NANO_OF_SECOND, 1000000000L, null, DateTimeException.…
DTCKOffsetTime.java74 import static java.time.temporal.ChronoField.NANO_OF_SECOND;
161 NANO_OF_SECOND, in validFields()
522 assertEquals(TEST_11_30_59_500_PONE.isSupported(ChronoField.NANO_OF_SECOND), true);
587 assertEquals(test.get(ChronoField.NANO_OF_SECOND), 987654321);
600 assertEquals(test.getLong(ChronoField.NANO_OF_SECOND), 987654321);
783 …assertEquals(test.with(ChronoField.NANO_OF_SECOND, 12345), OffsetTime.of(12, 30, 40, 12345, OFFSET…
DTCKDayOfWeek.java168 assertEquals(DayOfWeek.THURSDAY.isSupported(ChronoField.NANO_OF_SECOND), false); in test_isSupported_TemporalField()
DTCKOffsetDateTime.java86 import static java.time.temporal.ChronoField.NANO_OF_SECOND;
180 NANO_OF_SECOND, in validFields()
539 … assertEquals(TEST_2008_6_30_11_30_59_000000500.isSupported(ChronoField.NANO_OF_SECOND), true);
610 assertEquals(test.get(ChronoField.NANO_OF_SECOND), 987654321);
629 assertEquals(test.getLong(ChronoField.NANO_OF_SECOND), 987654321);
DTCKZonedDateTime.java86 import static java.time.temporal.ChronoField.NANO_OF_SECOND;
182 NANO_OF_SECOND, in validFields()
702 return field == INSTANT_SECONDS || field == NANO_OF_SECOND;
865 assertEquals(TEST_DATE_TIME.isSupported(ChronoField.NANO_OF_SECOND), true);
936 assertEquals(test.get(ChronoField.NANO_OF_SECOND), 987654321);
955 assertEquals(test.getLong(ChronoField.NANO_OF_SECOND), 987654321);
DTCKMonth.java160 assertEquals(Month.AUGUST.isSupported(ChronoField.NANO_OF_SECOND), false); in test_isSupported_TemporalField()
DTCKLocalDateTime.java84 import static java.time.temporal.ChronoField.NANO_OF_SECOND;
185 NANO_OF_SECOND, in validFields()
922 … assertEquals(TEST_2007_07_15_12_30_40_987654321.isSupported(ChronoField.NANO_OF_SECOND), true);
993 assertEquals(test.get(ChronoField.NANO_OF_SECOND), 987654321);
1010 assertEquals(test.getLong(ChronoField.NANO_OF_SECOND), 987654321);
DTCKYear.java336 assertEquals(TEST_2008.isSupported(ChronoField.NANO_OF_SECOND), false); in test_isSupported_TemporalField()
DTCKYearMonth.java401 assertEquals(TEST_2008_06.isSupported(ChronoField.NANO_OF_SECOND), false); in test_isSupported_TemporalField()
/libcore/luni/src/test/java/libcore/java/time/
DYearMonthTest.java116 ChronoField.NANO_OF_SECOND, in test_with_TemporalField_long_invalidField()
/libcore/luni/src/test/java/libcore/java/time/chrono/
DJapaneseChronologyTest.java111 assertEquals(false, date.isSupported(ChronoField.NANO_OF_SECOND)); in test_JapaneseDate_isSupported_TemporalField()
/libcore/ojluni/src/main/java/java/time/temporal/
DChronoField.java122 NANO_OF_SECOND("NanoOfSecond", NANOS, SECONDS, ValueRange.of(0, 999_999_999)), enumConstant
/libcore/ojluni/src/main/java/java/time/format/
DDateTimeFormatter.java70 import static java.time.temporal.ChronoField.NANO_OF_SECOND;
811 .appendFraction(NANO_OF_SECOND, 0, 9, true)

12