Home
last modified time | relevance | path

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

12

/libcore/luni/src/test/java/libcore/java/time/
DOffsetDateTimeTest.java44 ODT.plus(1, ChronoUnit.HOURS)); in test_plus()
46 ODT.plus(23, ChronoUnit.HOURS)); in test_plus()
60 ODT.minus(1, ChronoUnit.HOURS)); in test_minus_utc_offset()
62 ODT.minus(23, ChronoUnit.HOURS)); in test_minus_utc_offset()
80 odt.minus(1, ChronoUnit.HOURS)); in test_minus_non_utc_offset()
82 odt.minus(23, ChronoUnit.HOURS)); in test_minus_non_utc_offset()
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()
DInstantTest.java41 assertEquals(true, Instant.EPOCH.isSupported(ChronoUnit.HOURS)); in test_isSupported_TemporalUnit()
/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/test/java/util/concurrent/tck/
DTimeUnitTest.java38 import static java.util.concurrent.TimeUnit.HOURS;
70 SECONDS.convert(t, HOURS)); in testConvert()
85 MILLISECONDS.convert(t, HOURS)); in testConvert()
100 MICROSECONDS.convert(t, HOURS)); in testConvert()
115 NANOSECONDS.convert(t, HOURS)); in testConvert()
147 HOURS.toNanos(t)); in testToNanos()
170 HOURS.toMicros(t)); in testToMicros()
193 HOURS.toMillis(t)); in testToMillis()
216 HOURS.toSeconds(t)); in testToSeconds()
239 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/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];
293 return HOURS[hour]; // for performance in of()
314 return HOURS[hour]; // for performance in of()
475 return HOURS[hour]; in create()
1069 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/
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;
344 {0, HOURS, 0, 0}, in provider_factory_of_longTemporalUnit()
352 {1, HOURS, 3600, 0}, in provider_factory_of_longTemporalUnit()
360 {3, HOURS, 3 * 3600, 0}, in provider_factory_of_longTemporalUnit()
368 {-1, HOURS, -3600, 0}, in provider_factory_of_longTemporalUnit()
376 {-3, HOURS, -3 * 3600, 0}, in provider_factory_of_longTemporalUnit()
389 {Long.MAX_VALUE / 3600, HOURS, (Long.MAX_VALUE / 3600) * 3600, 0}, in provider_factory_of_longTemporalUnit()
390 {Long.MIN_VALUE / 3600, HOURS, (Long.MIN_VALUE / 3600) * 3600, 0}, in provider_factory_of_longTemporalUnit()
408 {Long.MAX_VALUE / 3600 + 1, HOURS}, in provider_factory_of_longTemporalUnit_outOfRange()
409 {Long.MIN_VALUE / 3600 - 1, HOURS}, in provider_factory_of_longTemporalUnit_outOfRange()
[all …]
DTCKLocalTime.java80 import static java.time.temporal.ChronoUnit.HOURS;
641 assertEquals(TEST_12_30_40_987654321.isSupported(ChronoUnit.HOURS), true); in test_isSupported_TemporalUnit()
1389 {LocalTime.of(1, 2, 3, 123_456_789), HOURS, LocalTime.of(1, 0)}, in data_truncatedToValid()
1428 TemporalAmount period = MockSimplePeriod.of(7, ChronoUnit.HOURS); in test_plus_TemporalAmount_positiveHours()
1449 TemporalAmount p = MockSimplePeriod.of(1, HOURS); in test_plus_TemporalAmount_wrap()
1470 LocalTime t = TEST_12_30_40_987654321.plus(7, ChronoUnit.HOURS); in test_plus_longTemporalUnit_positiveHours()
1854 TemporalAmount period = MockSimplePeriod.of(7, ChronoUnit.HOURS);
1875 TemporalAmount p = MockSimplePeriod.of(1, HOURS);
1896 LocalTime t = TEST_12_30_40_987654321.minus(7, ChronoUnit.HOURS);
2308 {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 …]
/libcore/ojluni/src/test/java/time/tck/java/time/zone/serial/
DTCKZoneOffsetTransitionSerialization.java62 import static java.time.temporal.ChronoUnit.HOURS;
/libcore/luni/src/test/java/libcore/java/time/chrono/
DJapaneseDateTest.java74 JapaneseDate.now().minus(1, ChronoUnit.HOURS); in minus_less_than_day_throwsUnsupportedTemporalTypeException()
DHijrahDateTest.java115 hijrahNow.until(isoNow, ChronoUnit.HOURS); in until_isoDates_unsupportedTypes()
/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()
/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