Home
last modified time | relevance | path

Searched refs:NANO_OF_SECOND (Results 1 – 25 of 31) 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/main/java/java/time/format/
DParsed.java77 import static java.time.temporal.ChronoField.NANO_OF_SECOND;
405 updateCheckConflict(NANO_OF_DAY, NANO_OF_SECOND, nod % 1_000_000_000L); in resolveTimeFields()
442 if (fieldValues.containsKey(NANO_OF_SECOND)) { in resolveTimeFields()
443 long nos = fieldValues.get(NANO_OF_SECOND); in resolveTimeFields()
445 NANO_OF_SECOND.checkValidValue(nos); in resolveTimeFields()
453 updateCheckConflict(MICRO_OF_SECOND, NANO_OF_SECOND, nos); in resolveTimeFields()
460 … updateCheckConflict(MILLI_OF_SECOND, NANO_OF_SECOND, los * 1_000_000L + (nos % 1_000_000L)); in resolveTimeFields()
466 … fieldValues.containsKey(SECOND_OF_MINUTE) && fieldValues.containsKey(NANO_OF_SECOND)) { in resolveTimeFields()
470 long nos = fieldValues.remove(NANO_OF_SECOND); in resolveTimeFields()
489 fieldValues.put(NANO_OF_SECOND, cos * 1_000L); in resolveTimeLenient()
[all …]
DDateTimeFormatterBuilder.java76 import static java.time.temporal.ChronoField.NANO_OF_SECOND;
1792 appendFraction(NANO_OF_SECOND, count, count, false); in parseField()
1859 …FIELD_MAP.put('S', ChronoField.NANO_OF_SECOND); // LDML (SDF uses milli-of-second numbe…
1861 FIELD_MAP.put('n', ChronoField.NANO_OF_SECOND); // 310 (proposed for LDML)
3188 if (context.getTemporal().isSupported(NANO_OF_SECOND)) { in format()
3189 inNanos = context.getTemporal().getLong(NANO_OF_SECOND); in format()
3195 int inNano = NANO_OF_SECOND.checkValidIntValue(inNanos != null ? inNanos : 0); in format()
3258 .appendFraction(NANO_OF_SECOND, minDigits, maxDigits, true) in parse()
3274 Long nanoVal = newContext.getParsed(NANO_OF_SECOND); in parse()
3296 return context.setParsedField(NANO_OF_SECOND, nano, position, successPos); in parse()
DDateTimeFormatter.java70 import static java.time.temporal.ChronoField.NANO_OF_SECOND;
811 .appendFraction(NANO_OF_SECOND, 0, 9, true)
/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;
336 NANO_OF_SECOND.checkValidValue(nanoOfSecond); in of()
657 case NANO_OF_SECOND: return nano; in get0()
832 case NANO_OF_SECOND: return withNano((int) newValue); in with()
918 NANO_OF_SECOND.checkValidValue(nanoOfSecond); in withNano()
DDuration.java68 import static java.time.temporal.ChronoField.NANO_OF_SECOND;
472 … nanos = endExclusive.getLong(NANO_OF_SECOND) - startInclusive.getLong(NANO_OF_SECOND); in between()
655 NANO_OF_SECOND.checkValidIntValue(nanoOfSecond); in withNanos()
DZonedDateTime.java65 import static java.time.temporal.ChronoField.NANO_OF_SECOND;
550 int nanoOfSecond = temporal.get(NANO_OF_SECOND); in from()
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/
DTCKLocalTime.java74 import static java.time.temporal.ChronoField.NANO_OF_SECOND;
168 NANO_OF_SECOND, in validFields()
564 assertEquals(TEST_12_30_40_987654321.isSupported(ChronoField.NANO_OF_SECOND), true); in test_isSupported_TemporalField()
629 assertEquals(test.get(ChronoField.NANO_OF_SECOND), 987654321); in test_get_TemporalField()
645 assertEquals(test.getLong(ChronoField.NANO_OF_SECOND), 987654321); in test_getLong_TemporalField()
807 LocalTime test = TEST_12_30_40_987654321.with(NANO_OF_SECOND, i); in test_with_longTemporalField_nanoOfSecond()
808 assertEquals(test.get(NANO_OF_SECOND), i); in test_with_longTemporalField_nanoOfSecond()
832 assertEquals(test.get(NANO_OF_SECOND), i * 1_000); in test_with_longTemporalField_microOfSecond()
857 assertEquals(test.get(NANO_OF_SECOND), i * 1_000_000); in test_with_longTemporalField_milliOfSecond()
884 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);
/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/luni/src/test/java/libcore/java/time/chrono/
DJapaneseChronologyTest.java105 assertEquals(false, date.isSupported(ChronoField.NANO_OF_SECOND)); in test_JapaneseDate_isSupported_TemporalField()
/libcore/luni/src/test/java/libcore/java/time/
DYearMonthTest.java116 ChronoField.NANO_OF_SECOND, in test_with_TemporalField_long_invalidField()
/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/test/java/time/tck/java/time/chrono/
DTCKIsoChronology.java233 … field == ChronoField.INSTANT_SECONDS || field == ChronoField.NANO_OF_SECOND) { in test_zonedDateTime_TemporalAccessor()
244 if (field == ChronoField.NANO_OF_SECOND) { in test_zonedDateTime_TemporalAccessor()

12