Home
last modified time | relevance | path

Searched refs:HOURS (Results 1 – 25 of 37) sorted by relevance

12

/libcore/jsr166-tests/src/test/java/jsr166/
DTimeUnitTest.java12 import static java.util.concurrent.TimeUnit.HOURS;
46 SECONDS.convert(t, HOURS)); in testConvert()
61 MILLISECONDS.convert(t, HOURS)); in testConvert()
76 MICROSECONDS.convert(t, HOURS)); in testConvert()
91 NANOSECONDS.convert(t, HOURS)); in testConvert()
114 HOURS.toNanos(t)); in testToNanos()
137 HOURS.toMicros(t)); in testToMicros()
160 HOURS.toMillis(t)); in testToMillis()
183 HOURS.toSeconds(t)); in testToSeconds()
206 HOURS.toMinutes(t)); in testToMinutes()
[all …]
/libcore/ojluni/src/main/java/java/time/temporal/
DChronoField.java74 import static java.time.temporal.ChronoUnit.HOURS;
248 MINUTE_OF_HOUR("MinuteOfHour", MINUTES, HOURS, ValueRange.of(0, 59), "minute"),
273 HOUR_OF_AMPM("HourOfAmPm", HOURS, HALF_DAYS, ValueRange.of(0, 11)),
287 CLOCK_HOUR_OF_AMPM("ClockHourOfAmPm", HOURS, HALF_DAYS, ValueRange.of(1, 12)),
302 HOUR_OF_DAY("HourOfDay", HOURS, DAYS, ValueRange.of(0, 23), "hour"),
316 CLOCK_HOUR_OF_DAY("ClockHourOfDay", HOURS, DAYS, ValueRange.of(1, 24)),
DChronoUnit.java109 HOURS("Hours", Duration.ofSeconds(3600)), enumConstant
/libcore/luni/src/test/java/libcore/java/time/
DOffsetTimeTest.java46 NOON_UTC.plus(1, ChronoUnit.HOURS)); in test_plus()
48 NOON_UTC.plus(23, ChronoUnit.HOURS)); in test_plus()
63 assertPlusIsNoop(24, ChronoUnit.HOURS); in test_plus_noop()
DOffsetDateTimeTest.java44 ODT.plus(1, ChronoUnit.HOURS)); in test_plus()
46 ODT.plus(23, ChronoUnit.HOURS)); in test_plus()
DInstantTest.java41 assertEquals(true, Instant.EPOCH.isSupported(ChronoUnit.HOURS)); in test_isSupported_TemporalUnit()
/libcore/ojluni/src/test/java/time/tck/java/time/temporal/
DTCKChronoUnit.java65 import static java.time.temporal.ChronoUnit.HOURS;
112 {HOURS, false, true, false}, in data_chronoUnit()
143 {HOURS, LocalTime.of(1, 2, 3, 400), true, 1, LocalTime.of(2, 2, 3, 400)}, in data_unitAndTemporal()
158 {HOURS, LocalDate.of(2000, 2, 29), false, 1, null}, in data_unitAndTemporal()
DTCKChronoField.java89 import static java.time.temporal.ChronoUnit.HOURS;
130 {HOUR_OF_DAY, HOURS, DAYS}, in data_fieldUnit()
132 {MINUTE_OF_HOUR, MINUTES, HOURS}, in data_fieldUnit()
/libcore/ojluni/src/main/java/java/time/
DLocalTime.java143 private static final LocalTime[] HOURS = new LocalTime[24]; field in LocalTime
145 for (int i = 0; i < HOURS.length; i++) {
146 HOURS[i] = new LocalTime(i, 0, 0, 0);
148 MIDNIGHT = HOURS[0];
149 NOON = HOURS[12];
150 MIN = HOURS[0];
292 return HOURS[hour]; // for performance in of()
313 return HOURS[hour]; // for performance in of()
452 return HOURS[hour]; in create()
1046 case HOURS: return plusHours(amountToAdd); in plus()
[all …]
DInstant.java852 case HOURS: return plusSeconds(Math.multiplyExact(amountToAdd, SECONDS_PER_HOUR)); in plus()
1147 case HOURS: return secondsUntil(end) / SECONDS_PER_HOUR; in until()
/libcore/ojluni/src/test/java/time/tck/java/time/temporal/serial/
DTCKChronoUnitSerialization.java65 import static java.time.temporal.ChronoUnit.HOURS;
107 {HOURS}, in data_chronoUnit()
/libcore/luni/src/main/java/javax/xml/datatype/
DDuration.java161 boolean hourSet = isSet(DatatypeConstants.HOURS); in getXMLSchemaType()
270 return getFieldValueAsInt(DatatypeConstants.HOURS); in getHours()
907 BigInteger hours = (BigInteger) getField(DatatypeConstants.HOURS); in toString()
DDatatypeConstants.java144 public static final Field HOURS = new Field("HOURS", 3); field in DatatypeConstants
/libcore/ojluni/src/test/java/time/tck/java/time/zone/
DTCKZoneOffsetTransition.java62 import static java.time.temporal.ChronoUnit.HOURS;
129 assertEquals(test.getDuration(), Duration.of(1, HOURS)); in test_getters_gap()
144 assertEquals(test.getDuration(), Duration.of(-1, HOURS)); in test_getters_overlap()
/libcore/ojluni/src/test/java/nio/file/attribute/
DFileTimeTest.java84 cmp(Instant.MIN, Long.MIN_VALUE, HOURS, 1); in main()
92 cmp(Instant.MAX, Long.MAX_VALUE, HOURS, -1); in main()
182 ts(1L, HOURS, "1970-01-01T01:00:00Z"); in main()
192 ts(-1L, HOURS, "1969-12-31T23:00:00Z"); in main()
/libcore/ojluni/src/test/java/time/tck/java/time/zone/serial/
DTCKZoneOffsetTransitionSerialization.java62 import static java.time.temporal.ChronoUnit.HOURS;
/libcore/ojluni/src/test/java/time/tck/java/time/
DTCKInstant.java67 import static java.time.temporal.ChronoUnit.HOURS;
636 …{Instant.ofEpochSecond(86400 + 3600 + 60 + 1, 123_456_789), HOURS, Instant.ofEpochSecond(86400 + 3…
676 {HOURS, MockSimplePeriod.of(2, HOURS), 7201, 0},
681 {HOURS, MockSimplePeriod.of(11, HOURS), 39601, 0},
1791 {0, 0, -3600, 0, HOURS, -1L},
1792 {0, 0, -1, 999_999_999, HOURS, 0L},
1793 {0, 0, 3599, 0, HOURS, 0L},
1794 {0, 0, 3599, 999_999_999, HOURS, 0L},
1795 {0, 0, 3600, 0, HOURS, 1L},
1796 {0, 0, 3601, 0, HOURS, 1L},
[all …]
DTCKDuration.java64 import static java.time.temporal.ChronoUnit.HOURS;
342 {0, HOURS, 0, 0}, in provider_factory_of_longTemporalUnit()
350 {1, HOURS, 3600, 0}, in provider_factory_of_longTemporalUnit()
358 {3, HOURS, 3 * 3600, 0}, in provider_factory_of_longTemporalUnit()
366 {-1, HOURS, -3600, 0}, in provider_factory_of_longTemporalUnit()
374 {-3, HOURS, -3 * 3600, 0}, in provider_factory_of_longTemporalUnit()
387 {Long.MAX_VALUE / 3600, HOURS, (Long.MAX_VALUE / 3600) * 3600, 0}, in provider_factory_of_longTemporalUnit()
388 {Long.MIN_VALUE / 3600, HOURS, (Long.MIN_VALUE / 3600) * 3600, 0}, in provider_factory_of_longTemporalUnit()
406 {Long.MAX_VALUE / 3600 + 1, HOURS}, in provider_factory_of_longTemporalUnit_outOfRange()
407 {Long.MIN_VALUE / 3600 - 1, HOURS}, in provider_factory_of_longTemporalUnit_outOfRange()
[all …]
DTCKLocalTime.java80 import static java.time.temporal.ChronoUnit.HOURS;
607 assertEquals(TEST_12_30_40_987654321.isSupported(ChronoUnit.HOURS), true); in test_isSupported_TemporalUnit()
1355 {LocalTime.of(1, 2, 3, 123_456_789), HOURS, LocalTime.of(1, 0)}, in data_truncatedToValid()
1394 TemporalAmount period = MockSimplePeriod.of(7, ChronoUnit.HOURS); in test_plus_TemporalAmount_positiveHours()
1415 TemporalAmount p = MockSimplePeriod.of(1, HOURS); in test_plus_TemporalAmount_wrap()
1436 LocalTime t = TEST_12_30_40_987654321.plus(7, ChronoUnit.HOURS); in test_plus_longTemporalUnit_positiveHours()
1820 TemporalAmount period = MockSimplePeriod.of(7, ChronoUnit.HOURS);
1841 TemporalAmount p = MockSimplePeriod.of(1, HOURS);
1862 LocalTime t = TEST_12_30_40_987654321.minus(7, ChronoUnit.HOURS);
2274 {time(0, 0, 0, 0), time(0, 0, 0, 0), HOURS, 0},
[all …]
DTCKLocalDateTime.java94 import static java.time.temporal.ChronoUnit.HOURS;
965 assertEquals(TEST_2007_07_15_12_30_40_987654321.isSupported(ChronoUnit.HOURS), true);
2810 {dtEpoch(0, 0, 0, 0), dtEpoch(0, 0, 0, 0), HOURS, 0},
2818 {dtEpoch(0, 0, 0, 0), dtEpoch(2, 0, 0, 0), HOURS, 2},
2826 {dtEpoch(0, 0, 0, 0), dtEpoch(14, 0, 0, 0), HOURS, 14},
2834 {dtEpoch(0, 0, 0, 0), dtEpoch(2, 30, 40, 1500), HOURS, 2},
2871 … {dt(2000, 1, 15, 12, 30, 40, 500), dt(2000, 1, 16, 11, 30, 40, 499), HOURS, -2 + 24L},
2872 … {dt(2000, 1, 15, 12, 30, 40, 500), dt(2000, 1, 16, 11, 30, 40, 500), HOURS, -1 + 24L},
2873 … {dt(2000, 1, 15, 12, 30, 40, 500), dt(2000, 1, 16, 11, 30, 40, 501), HOURS, -1 + 24L},
2874 … {dt(2000, 1, 15, 12, 30, 40, 500), dt(2000, 1, 16, 12, 30, 40, 499), HOURS, -1 + 24L},
[all …]
DTCKZonedDateTime.java94 import static java.time.temporal.ChronoUnit.HOURS;
908 assertEquals(TEST_DATE_TIME.isSupported(ChronoUnit.HOURS), true);
1631 assertEquals(base.plus(MockSimplePeriod.of(amount, HOURS)), expected);
1682 assertEquals(base.plus(amount, HOURS), expected);
1836 assertEquals(base.minus(MockSimplePeriod.of(-amount, HOURS)), expected);
2014 assertEquals(base.until(end, HOURS), expected);
2039 assertEquals(midnightLondon.until(midnightParis1, HOURS), 23);
2040 assertEquals(midnightLondon.until(oneAm1, HOURS), 24);
2041 assertEquals(midnightLondon.until(midnightParis2, HOURS), 23 + 24);
2053 assertEquals(before.until(after, HOURS), 23);
[all …]
/libcore/ojluni/src/test/java/time/tck/java/time/chrono/
DTCKChronoPeriod.java60 import static java.time.temporal.ChronoUnit.HOURS;
129 period.get(HOURS); in test_get_unsupported()
DTCKChronoLocalDateTime.java271 dates.add(date.minus(1, ChronoUnit.HOURS)); in test_datetime_comparisons()
279 dates.add(date.plus(1, ChronoUnit.HOURS)); in test_datetime_comparisons()
DTCKChronoZonedDateTime.java274 dates.add(date.minus(1, ChronoUnit.HOURS)); in test_zonedDateTime_comparisons()
282 dates.add(date.plus(1, ChronoUnit.HOURS)); in test_zonedDateTime_comparisons()
/libcore/ojluni/src/main/java/java/time/chrono/
DChronoLocalDateTimeImpl.java313 case HOURS: return plusHours(amountToAdd); in plus()
384 case HOURS: amount = Math.multiplyExact(amount, HOURS_PER_DAY); break; in until()

12