Home
last modified time | relevance | path

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

12

/libcore/ojluni/src/test/java/time/test/java/time/format/
DTestFractionPrinterParser.java63 import static java.time.temporal.ChronoField.NANO_OF_SECOND;
96 getFormatter(NANO_OF_SECOND, 0, 9, true).formatTo(EMPTY_DTA, buf); in test_print_emptyCalendrical()
101 getFormatter(NANO_OF_SECOND, 0, 9, true).formatTo(LocalTime.of(12, 30, 40, 3), buf); in test_print_append()
184 …getFormatter(NANO_OF_SECOND, minWidth, maxWidth, true).formatTo(new MockFieldValue(NANO_OF_SECOND in test_print_nanos()
193 …getFormatter(NANO_OF_SECOND, minWidth, maxWidth, false).formatTo(new MockFieldValue(NANO_OF_SECON… in test_print_nanos_noDecimalPoint()
249 …TemporalAccessor parsed = getFormatter(NANO_OF_SECOND, minWidth, maxWidth, true).parseUnresolved(r… in test_reverseParse()
251 … assertParsed(parsed, NANO_OF_SECOND, value == 0 && minWidth == 0 ? null : (long) expectedValue); in test_reverseParse()
257 …TemporalAccessor parsed = getFormatter(NANO_OF_SECOND, minWidth, maxWidth, false).parseUnresolved(… in test_reverseParse_noDecimalPoint()
260 … assertParsed(parsed, NANO_OF_SECOND, value == 0 && minWidth == 0 ? null : (long) expectedValue); in test_reverseParse_noDecimalPoint()
267 …TemporalAccessor parsed = getFormatter(NANO_OF_SECOND, minWidth, maxWidth, true).parseUnresolved(r… in test_reverseParse_followedByNonDigit()
[all …]
DTestDateTimeParsing.java68 import static java.time.temporal.ChronoField.NANO_OF_SECOND;
120 .appendValue(INSTANT_SECONDS).appendLiteral('.').appendValue(NANO_OF_SECOND).toFormatter();
175 assertEquals(actual.isSupported(NANO_OF_SECOND), true); in test_parse_instantZones_supported()
214 assertEquals(actual.isSupported(NANO_OF_SECOND), true); in test_parse_instantNoZone_supported()
/libcore/ojluni/src/main/java/java/time/format/
DParsed.java78 import static java.time.temporal.ChronoField.NANO_OF_SECOND;
420 updateCheckConflict(NANO_OF_DAY, NANO_OF_SECOND, nod % 1_000_000_000L); in resolveTimeFields()
457 if (fieldValues.containsKey(NANO_OF_SECOND)) { in resolveTimeFields()
458 long nos = fieldValues.get(NANO_OF_SECOND); in resolveTimeFields()
460 NANO_OF_SECOND.checkValidValue(nos); in resolveTimeFields()
468 updateCheckConflict(MICRO_OF_SECOND, NANO_OF_SECOND, nos); in resolveTimeFields()
475 … updateCheckConflict(MILLI_OF_SECOND, NANO_OF_SECOND, los * 1_000_000L + (nos % 1_000_000L)); in resolveTimeFields()
494 … fieldValues.containsKey(SECOND_OF_MINUTE) && fieldValues.containsKey(NANO_OF_SECOND)) { in resolveTimeFields()
498 long nos = fieldValues.remove(NANO_OF_SECOND); in resolveTimeFields()
517 fieldValues.put(NANO_OF_SECOND, cos * 1_000L); in resolveTimeLenient()
[all …]
DDateTimeFormatterBuilder.java75 import static java.time.temporal.ChronoField.NANO_OF_SECOND;
2034 appendFraction(NANO_OF_SECOND, count, count, false); in parseField()
2109 …FIELD_MAP.put('S', ChronoField.NANO_OF_SECOND); // LDML (SDF uses milli-of-second numbe…
2111 FIELD_MAP.put('n', ChronoField.NANO_OF_SECOND); // 310 (proposed for LDML)
3496 if (context.getTemporal().isSupported(NANO_OF_SECOND)) { in format()
3497 inNanos = context.getTemporal().getLong(NANO_OF_SECOND); in format()
3503 int inNano = NANO_OF_SECOND.checkValidIntValue(inNanos != null ? inNanos : 0); in format()
3566 .appendFraction(NANO_OF_SECOND, minDigits, maxDigits, true) in parse()
3582 Long nanoVal = newContext.getParsed(NANO_OF_SECOND); in parse()
3605 return context.setParsedField(NANO_OF_SECOND, nano, position, successPos); in parse()
DDateTimeFormatter.java70 import static java.time.temporal.ChronoField.NANO_OF_SECOND;
851 .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;
178 {YEAR, 2012, NANO_OF_SECOND, 5}, in data_resolveTwoNoChange()
187 {MONTH_OF_YEAR, 5, NANO_OF_SECOND, 5}, in data_resolveTwoNoChange()
217 {HOUR_OF_DAY, 1, SECOND_OF_MINUTE, 5, NANO_OF_SECOND, 5}, in data_resolveThreeNoChange()
218 {MINUTE_OF_HOUR, 1, SECOND_OF_MINUTE, 5, NANO_OF_SECOND, 5}, in data_resolveThreeNoChange()
252 {MICRO_OF_SECOND, 12, NANO_OF_SECOND, 12_000L, null, null}, in data_resolveOneToField()
253 {MILLI_OF_SECOND, 12, NANO_OF_SECOND, 12_000_000L, null, null}, in data_resolveOneToField()
438 {SECOND_OF_DAY, 3600 + 650, NANO_OF_SECOND, 2, LocalTime.of(1, 10, 50, 2)}, in data_resolveTwoToTime()
446 …{MILLI_OF_DAY, (3600 + 650) * 1000L + 2, NANO_OF_SECOND, 2_000_004, LocalTime.of(1, 10, 50, 2_000_… in data_resolveTwoToTime()
454 …{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.java67 import static java.time.temporal.ChronoField.NANO_OF_SECOND;
1183 …dValue(HOUR_OF_DAY, 2).appendValue(MINUTE_OF_HOUR, 2).appendFraction(NANO_OF_SECOND, 0, 3, false).… in test_adjacent_strict_fractionFollows()
1190 assertEquals(parsed.getLong(NANO_OF_SECOND), 567_000_000L); in test_adjacent_strict_fractionFollows()
1196 …dValue(HOUR_OF_DAY, 2).appendValue(MINUTE_OF_HOUR, 2).appendFraction(NANO_OF_SECOND, 0, 3, false).… in test_adjacent_strict_fractionFollows_2digit()
1203 assertEquals(parsed.getLong(NANO_OF_SECOND), 560_000_000L); in test_adjacent_strict_fractionFollows_2digit()
1209 …dValue(HOUR_OF_DAY, 2).appendValue(MINUTE_OF_HOUR, 2).appendFraction(NANO_OF_SECOND, 0, 3, false).… in test_adjacent_strict_fractionFollows_0digit()
1221 …dValue(HOUR_OF_DAY, 2).appendValue(MINUTE_OF_HOUR, 2).appendFraction(NANO_OF_SECOND, 3, 3, false).… in test_adjacent_lenient_fractionFollows()
1228 assertEquals(parsed.getLong(NANO_OF_SECOND), 567_000_000L); in test_adjacent_lenient_fractionFollows()
1234 …dValue(HOUR_OF_DAY, 2).appendValue(MINUTE_OF_HOUR, 2).appendFraction(NANO_OF_SECOND, 3, 3, false).… in test_adjacent_lenient_fractionFollows_2digit()
1241 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;
369 int nanoOfSecond = temporal.get(NANO_OF_SECOND); in from()
454 …return field == INSTANT_SECONDS || field == NANO_OF_SECOND || field == MICRO_OF_SECOND || field ==… in isSupported()
556 case NANO_OF_SECOND: return nanos; in get()
592 case NANO_OF_SECOND: return nanos; in getLong()
710 … case NANO_OF_SECOND: return (newValue != nanos ? create(seconds, (int) newValue) : this); in with()
1088 return temporal.with(INSTANT_SECONDS, seconds).with(NANO_OF_SECOND, nanos); in adjustInto()
DLocalTime.java68 import static java.time.temporal.ChronoField.NANO_OF_SECOND;
338 NANO_OF_SECOND.checkValidValue(nanoOfSecond); in of()
681 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;
475 … nanos = endExclusive.getLong(NANO_OF_SECOND) - startInclusive.getLong(NANO_OF_SECOND); in between()
658 NANO_OF_SECOND.checkValidIntValue(nanoOfSecond); in withNanos()
DZonedDateTime.java65 import static java.time.temporal.ChronoField.NANO_OF_SECOND;
552 int nanoOfSecond = temporal.get(NANO_OF_SECOND); in from()
DLocalDateTime.java73 import static java.time.temporal.ChronoField.NANO_OF_SECOND;
413 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;
170 NANO_OF_SECOND, in validFields()
592 assertEquals(TEST_12_30_40_987654321.isSupported(ChronoField.NANO_OF_SECOND), true); in test_isSupported_TemporalField()
657 assertEquals(test.get(ChronoField.NANO_OF_SECOND), 987654321); in test_get_TemporalField()
673 assertEquals(test.getLong(ChronoField.NANO_OF_SECOND), 987654321); in test_getLong_TemporalField()
835 LocalTime test = TEST_12_30_40_987654321.with(NANO_OF_SECOND, i); in test_with_longTemporalField_nanoOfSecond()
836 assertEquals(test.get(NANO_OF_SECOND), i); in test_with_longTemporalField_nanoOfSecond()
860 assertEquals(test.get(NANO_OF_SECOND), i * 1_000); in test_with_longTemporalField_microOfSecond()
885 assertEquals(test.get(NANO_OF_SECOND), i * 1_000_000); in test_with_longTemporalField_milliOfSecond()
912 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;
158 NANO_OF_SECOND, in validFields()
514 assertEquals(TEST_11_30_59_500_PONE.isSupported(ChronoField.NANO_OF_SECOND), true);
579 assertEquals(test.get(ChronoField.NANO_OF_SECOND), 987654321);
592 assertEquals(test.getLong(ChronoField.NANO_OF_SECOND), 987654321);
775 …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;
176 NANO_OF_SECOND, in validFields()
524 … assertEquals(TEST_2008_6_30_11_30_59_000000500.isSupported(ChronoField.NANO_OF_SECOND), true);
595 assertEquals(test.get(ChronoField.NANO_OF_SECOND), 987654321);
614 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/
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.java133 NANO_OF_SECOND("NanoOfSecond", NANOS, SECONDS, ValueRange.of(0, 999_999_999)), enumConstant
/libcore/ojluni/src/test/java/time/test/java/util/
DTestFormatter.java177 final int nanos = ta.get(ChronoField.NANO_OF_SECOND); in test()
/libcore/ojluni/src/test/java/time/tck/java/time/chrono/
DTCKIsoChronology.java241 … field == ChronoField.INSTANT_SECONDS || field == ChronoField.NANO_OF_SECOND) { in test_zonedDateTime_TemporalAccessor()
252 if (field == ChronoField.NANO_OF_SECOND) { in test_zonedDateTime_TemporalAccessor()

12