Home
last modified time | relevance | path

Searched refs:hours (Results 1 – 25 of 27) sorted by relevance

12

/libcore/ojluni/src/main/java/java/time/
DZoneOffset.java206 final int hours, minutes, seconds; in of() local
211 hours = parseNumber(offsetId, 1, false); in of()
216 hours = parseNumber(offsetId, 1, false); in of()
221 hours = parseNumber(offsetId, 1, false); in of()
226 hours = parseNumber(offsetId, 1, false); in of()
231 hours = parseNumber(offsetId, 1, false); in of()
243 return ofHoursMinutesSeconds(-hours, -minutes, -seconds); in of()
245 return ofHoursMinutesSeconds(hours, minutes, seconds); in of()
277 public static ZoneOffset ofHours(int hours) { in ofHours() argument
278 return ofHoursMinutesSeconds(hours, 0, 0); in ofHours()
[all …]
DLocalDateTime.java1288 public LocalDateTime plusHours(long hours) { in plusHours() argument
1289 return plusWithOverflow(date, hours, 0, 0, 0, 1); in plusHours()
1482 public LocalDateTime minusHours(long hours) { in minusHours() argument
1483 return plusWithOverflow(date, hours, 0, 0, 0, -1); in minusHours()
1539 …private LocalDateTime plusWithOverflow(LocalDate newDate, long hours, long minutes, long seconds, … in plusWithOverflow() argument
1541 if ((hours | minutes | seconds | nanos) == 0) { in plusWithOverflow()
1547 hours / HOURS_PER_DAY; // max/24 in plusWithOverflow()
1552 (hours % HOURS_PER_DAY) * NANOS_PER_HOUR; // max 86400000000000 in plusWithOverflow()
DLocalTime.java377 int hours = (int) (secondOfDay / SECONDS_PER_HOUR); in ofSecondOfDay() local
378 secondOfDay -= hours * SECONDS_PER_HOUR; in ofSecondOfDay()
381 return create(hours, minutes, (int) secondOfDay, 0); in ofSecondOfDay()
395 int hours = (int) (nanoOfDay / NANOS_PER_HOUR); in ofNanoOfDay() local
396 nanoOfDay -= hours * NANOS_PER_HOUR; in ofNanoOfDay()
401 return create(hours, minutes, seconds, (int) nanoOfDay); in ofNanoOfDay()
DDuration.java190 public static Duration ofHours(long hours) { in ofHours() argument
191 return create(Math.multiplyExact(hours, SECONDS_PER_HOUR), 0); in ofHours()
1440 long hours = seconds / SECONDS_PER_HOUR; in toString() local
1445 if (hours != 0) { in toString()
1446 buf.append(hours).append('H'); in toString()
DOffsetTime.java892 public OffsetTime plusHours(long hours) { in plusHours() argument
893 return with(time.plusHours(hours), offset); in plusHours()
1003 public OffsetTime minusHours(long hours) { in minusHours() argument
1004 return with(time.minusHours(hours), offset); in minusHours()
DOffsetDateTime.java1285 public OffsetDateTime plusHours(long hours) { in plusHours() argument
1286 return with(dateTime.plusHours(hours), offset); in plusHours()
1474 public OffsetDateTime minusHours(long hours) { in minusHours() argument
1475 … return (hours == Long.MIN_VALUE ? plusHours(Long.MAX_VALUE).plusHours(1) : plusHours(-hours)); in minusHours()
DZonedDateTime.java1721 public ZonedDateTime plusHours(long hours) { in plusHours() argument
1722 return resolveInstant(dateTime.plusHours(hours)); in plusHours()
1966 public ZonedDateTime minusHours(long hours) { in minusHours() argument
1967 … return (hours == Long.MIN_VALUE ? plusHours(Long.MAX_VALUE).plusHours(1) : plusHours(-hours)); in minusHours()
/libcore/ojluni/src/main/java/sun/util/calendar/
DCalendarDate.java74 private int hours; field in CalendarDate
219 return hours; in getHours()
222 public CalendarDate setHours(int hours) { in setHours() argument
223 if (this.hours != hours) { in setHours()
224 this.hours = hours; in setHours()
232 hours += n; in addHours()
319 public CalendarDate setTimeOfDay(int hours, int minutes, int seconds, int millis) { in setTimeOfDay() argument
320 setHours(hours); in setTimeOfDay()
327 public CalendarDate addTimeOfDay(int hours, int minutes, int seconds, int millis) { in addTimeOfDay() argument
328 addHours(hours); in addTimeOfDay()
[all …]
DImmutableGregorianDate.java101 public CalendarDate setHours(int hours) { in setHours() argument
157 public CalendarDate setTimeOfDay(int hours, int minutes, int seconds, int millis) { in setTimeOfDay() argument
161 public CalendarDate addTimeOfDay(int hours, int minutes, int seconds, int millis) { in addTimeOfDay() argument
DAbstractCalendar.java249 int hours = time / HOUR_IN_MILLIS; in setTimeOfDay() local
255 cdate.setHours(hours); in setTimeOfDay()
260 if (hours < 24 && normalizedState) { in setTimeOfDay()
/libcore/luni/src/main/java/javax/xml/datatype/
DDatatypeFactory.java236 final BigInteger hours, in newDuration() argument
273 final int hours, in newDuration() argument
287 …BigInteger realHours = (hours != DatatypeConstants.FIELD_UNDEFINED) ? BigInteger.valueOf((long) ho… in newDuration()
413 int hours = (int) (val % 24L); // 24 hours per day in newDurationDayTime() local
417 DatatypeConstants.FIELD_UNDEFINED, (int) days, hours, minutes, seconds); in newDurationDayTime()
421 BigInteger.valueOf(days), BigInteger.valueOf(hours), in newDurationDayTime()
430 BigInteger hours = BigInteger.valueOf(val % 24L); // 24 hours per day in newDurationDayTime() local
433 return newDuration(isPositive, null, null, days, hours, minutes, seconds); in newDurationDayTime()
923 final int hours, in newXMLGregorianCalendarTime() argument
932 hours, in newXMLGregorianCalendarTime()
[all …]
DDuration.java907 BigInteger hours = (BigInteger) getField(DatatypeConstants.HOURS); in toString() local
910 if (hours != null || minutes != null || seconds != null) { in toString()
912 if (hours != null) { in toString()
913 buf.append(hours).append('H'); in toString()
/libcore/ojluni/annotations/hiddenapi/sun/util/calendar/
DCalendarDate.java105 public sun.util.calendar.CalendarDate setHours(int hours) { in setHours() argument
167 int hours, int minutes, int seconds, int millis) { in setTimeOfDay() argument
172 int hours, int minutes, int seconds, int millis) { in addTimeOfDay() argument
268 private int hours; field in CalendarDate
DImmutableGregorianDate.java95 public sun.util.calendar.CalendarDate setHours(int hours) { in setHours() argument
152 int hours, int minutes, int seconds, int millis) { in setTimeOfDay() argument
157 int hours, int minutes, int seconds, int millis) { in addTimeOfDay() argument
/libcore/ojluni/src/main/java/java/time/chrono/
DChronoLocalDateTimeImpl.java320 private ChronoLocalDateTimeImpl<D> plusHours(long hours) { in plusHours() argument
321 return plusWithOverflow(date, hours, 0, 0, 0); in plusHours()
337 …private ChronoLocalDateTimeImpl<D> plusWithOverflow(D newDate, long hours, long minutes, long seco… in plusWithOverflow() argument
339 if ((hours | minutes | seconds | nanos) == 0) { in plusWithOverflow()
345 hours / HOURS_PER_DAY; // max/24 in plusWithOverflow()
349 (hours % HOURS_PER_DAY) * NANOS_PER_HOUR; // max 86400000000000 in plusWithOverflow()
/libcore/luni/src/test/java/libcore/java/text/
DDateFormatSymbolsTest.java187 int hours = offset / millisInHour; in formattedOffset() local
188 int minutes = (offset - hours * millisInHour) / 1_000 / 60; in formattedOffset()
190 return String.format(pattern, hours, minutes); in formattedOffset()
/libcore/ojluni/src/test/java/time/tck/java/time/
DTCKZoneOffset.java660 private void doTestOffset(ZoneOffset offset, int hours, int minutes, int seconds) {
661 assertEquals(offset.getTotalSeconds(), hours * 60 * 60 + minutes * 60 + seconds);
663 if (hours == 0 && minutes == 0 && seconds == 0) {
666 String str = (hours < 0 || minutes < 0 || seconds < 0) ? "-" : "+";
667 str += Integer.toString(Math.abs(hours) + 100).substring(1);
677 assertEquals(offset, ZoneOffset.ofHoursMinutesSeconds(hours, minutes, seconds));
679 assertEquals(offset, ZoneOffset.ofHoursMinutes(hours, minutes));
681 assertEquals(offset, ZoneOffset.ofHours(hours));
DTCKDuration.java1239 public void plusHours_long(long hours, long amount, long expectedHours) { in plusHours_long() argument
1240 Duration t = Duration.ofHours(hours); in plusHours_long()
1858 public void minusHours_long(long hours, long amount, long expectedHours) { in minusHours_long() argument
1859 Duration t = Duration.ofHours(hours); in minusHours_long()
2756 public void test_toHoursPart(Duration dur, int hours) { in test_toHoursPart() argument
2757 assertEquals(dur.toHoursPart(), hours); in test_toHoursPart() local
/libcore/luni/src/test/java/libcore/javax/xml/datatype/
DDatatypeFactoryTest.java332 BigInteger months, BigInteger days, BigInteger hours, in newDuration() argument
337 int h = hours == null ? DatatypeConstants.FIELD_UNDEFINED : hours.intValue(); in newDuration()
/libcore/luni/src/test/java/libcore/java/util/
DGregorianCalendarTest.java41 Calendar.MARCH, 9, 0, hours(2),
42 Calendar.NOVEMBER, 2, 0, hours(2),
43 hours(1));
493 private static int hours(int count) { in hours() method in GregorianCalendarTest
/libcore/ojluni/annotations/hiddenapi/java/time/
DOffsetDateTime.java297 public java.time.OffsetDateTime plusHours(long hours) { in plusHours() argument
338 public java.time.OffsetDateTime minusHours(long hours) { in minusHours() argument
DDuration.java81 public static java.time.Duration ofHours(long hours) { in ofHours() argument
/libcore/ojluni/src/main/java/java/text/
DSimpleDateFormat.java2205 int hours; in subParseNumericZone() local
2209 hours = c - '0'; in subParseNumericZone()
2212 hours = hours * 10 + (c - '0'); in subParseNumericZone()
2225 if (hours > 23) { in subParseNumericZone()
2266 minutes += hours * 60; in subParseNumericZone()
/libcore/ojluni/src/main/java/java/util/
DDate.java828 public void setHours(int hours) { in setHours() argument
829 getCalendarDate().setHours(hours); in setHours()
DGregorianCalendar.java2416 int hours = timeOfDay / ONE_HOUR; in computeFields() local
2417 internalSet(HOUR_OF_DAY, hours); in computeFields()
2418 internalSet(AM_PM, hours / 12); // Assume AM == 0 in computeFields()
2419 internalSet(HOUR, hours % 12); in computeFields()

12