Searched defs:hours (Results 1 - 14 of 14) sorted by relevance

/libcore/luni/src/main/java/javax/xml/datatype/
H A DDatatypeFactory.java208 * specifying the <code>Duration</code> as isPositive, years, months, days, hours, minutes, seconds.</p>
222 * @param hours of this <code>Duration</code>
236 final BigInteger hours,
242 * specifying the <code>Duration</code> as isPositive, years, months, days, hours, minutes, seconds.</p>
251 * @param hours of this <code>Duration</code>
264 * BigInteger hours,
273 final int hours,
286 // hours may not be set
287 BigInteger realHours = (hours != DatatypeConstants.FIELD_UNDEFINED) ? BigInteger.valueOf((long) hours)
231 newDuration( final boolean isPositive, final BigInteger years, final BigInteger months, final BigInteger days, final BigInteger hours, final BigInteger minutes, final BigDecimal seconds) argument
268 newDuration( final boolean isPositive, final int years, final int months, final int days, final int hours, final int minutes, final int seconds) argument
922 newXMLGregorianCalendarTime( final int hours, final int minutes, final int seconds, final int timezone) argument
960 newXMLGregorianCalendarTime( final int hours, final int minutes, final int seconds, final BigDecimal fractionalSecond, final int timezone) argument
998 newXMLGregorianCalendarTime( final int hours, final int minutes, final int seconds, final int milliseconds, final int timezone) argument
[all...]
/libcore/luni/src/test/java/libcore/java/util/
H A DGregorianCalendarTest.java41 Calendar.MARCH, 9, 0, hours(2),
42 Calendar.NOVEMBER, 2, 0, hours(2),
43 hours(1));
117 // "1st Jan 2000 00:00:01 GMT" is 8 hours before the Julian/Gregorian switch in LA. The day
493 private static int hours(int count) { method in class:GregorianCalendarTest
/libcore/ojluni/src/main/java/java/time/
H A DZoneOffset.java94 * This is usually a fixed number of hours and minutes.
100 * For example, Paris is one hour ahead of Greenwich/UTC in winter and two hours
110 * The fields of hours, minutes and seconds make assumptions that are valid for the
205 final int hours, minutes, seconds;
210 hours = parseNumber(offsetId, 1, false);
215 hours = parseNumber(offsetId, 1, false);
220 hours = parseNumber(offsetId, 1, false);
225 hours = parseNumber(offsetId, 1, false);
230 hours = parseNumber(offsetId, 1, false);
242 return ofHoursMinutesSeconds(-hours,
276 ofHours(int hours) argument
293 ofHoursMinutes(int hours, int minutes) argument
310 ofHoursMinutesSeconds(int hours, int minutes, int seconds) argument
356 validate(int hours, int minutes, int seconds) argument
393 totalSeconds(int hours, int minutes, int seconds) argument
[all...]
H A DDuration.java101 * It can be accessed using other duration-based units, such as minutes and hours.
103 * exactly equal to 24 hours, thus ignoring daylight savings effects.
177 * Obtains a {@code Duration} representing a number of standard hours.
183 * @param hours the number of hours, positive or negative
185 * @throws ArithmeticException if the input hours exceeds the capacity of {@code Duration}
187 public static Duration ofHours(long hours) { argument
188 return create(Math.multiplyExact(hours, SECONDS_PER_HOUR), 0);
293 * be {@link ChronoUnit#DAYS} which is treated as 24 hours. Other units throw an exception.
318 * or be {@link ChronoUnit#DAYS} which is treated as 24 hours
[all...]
H A DOffsetTime.java881 * Returns a copy of this {@code OffsetTime} with the specified number of hours added.
883 * This adds the specified number of hours to this time, returning a new time.
888 * @param hours the hours to add, may be negative
889 * @return an {@code OffsetTime} based on this time with the hours added, not null
891 public OffsetTime plusHours(long hours) { argument
892 return with(time.plusHours(hours), offset);
992 * Returns a copy of this {@code OffsetTime} with the specified number of hours subtracted.
994 * This subtracts the specified number of hours from this time, returning a new time.
999 * @param hours th
1002 minusHours(long hours) argument
[all...]
H A DLocalDateTime.java1286 * Returns a copy of this {@code LocalDateTime} with the specified number of hours added.
1290 * @param hours the hours to add, may be negative
1291 * @return a {@code LocalDateTime} based on this date-time with the hours added, not null
1294 public LocalDateTime plusHours(long hours) { argument
1295 return plusWithOverflow(date, hours, 0, 0, 0, 1);
1481 * Returns a copy of this {@code LocalDateTime} with the specified number of hours subtracted.
1485 * @param hours the hours to subtract, may be negative
1486 * @return a {@code LocalDateTime} based on this date-time with the hours subtracte
1489 minusHours(long hours) argument
1546 plusWithOverflow(LocalDate newDate, long hours, long minutes, long seconds, long nanos, int sign) argument
[all...]
H A DOffsetDateTime.java1277 * Returns a copy of this {@code OffsetDateTime} with the specified number of hours added.
1281 * @param hours the hours to add, may be negative
1282 * @return an {@code OffsetDateTime} based on this date-time with the hours added, not null
1285 public OffsetDateTime plusHours(long hours) { argument
1286 return with(dateTime.plusHours(hours), offset);
1466 * Returns a copy of this {@code OffsetDateTime} with the specified number of hours subtracted.
1470 * @param hours the hours to subtract, may be negative
1471 * @return an {@code OffsetDateTime} based on this date-time with the hours subtracte
1474 minusHours(long hours) argument
[all...]
H A DZonedDateTime.java1695 * Returns a copy of this {@code ZonedDateTime} with the specified number of hours added.
1701 * thus adding one day is not the same as adding 24 hours.
1709 * <li>Adding three hours to 00:30+02:00 will result in 02:30+01:00
1714 * @param hours the hours to add, may be negative
1715 * @return a {@code ZonedDateTime} based on this date-time with the hours added, not null
1718 public ZonedDateTime plusHours(long hours) { argument
1719 return resolveInstant(dateTime.plusHours(hours));
1936 * Returns a copy of this {@code ZonedDateTime} with the specified number of hours subtracted.
1942 * thus subtracting one day is not the same as adding 24 hours
1959 minusHours(long hours) argument
[all...]
/libcore/ojluni/src/main/java/java/time/chrono/
H A DChronoLocalDateTimeImpl.java325 private ChronoLocalDateTimeImpl<D> plusHours(long hours) { argument
326 return plusWithOverflow(date, hours, 0, 0, 0);
342 private ChronoLocalDateTimeImpl<D> plusWithOverflow(D newDate, long hours, long minutes, long seconds, long nanos) { argument
344 if ((hours | minutes | seconds | nanos) == 0) {
350 hours / HOURS_PER_DAY; // max/24
354 (hours % HOURS_PER_DAY) * NANOS_PER_HOUR; // max 86400000000000
/libcore/ojluni/src/main/java/java/util/
H A DDate.java97 * year, month, date, hours, minutes, and seconds values, the
210 * @param hrs the hours between 0-23.
233 * @param hrs the hours between 0-23.
304 * @param hrs the hours between 0-23.
352 * 13:30:00 GMT+0430" (4 hours, 30 minutes west of the Greenwich
371 * in hours. Otherwise, it is regarded as an offset in minutes,
375 * <tt>-5</tt> occurring in the string would mean "five hours west
376 * of Greenwich" and <tt>+0430</tt> would mean "four hours and
434 * North America that is five, six, seven, or eight hours west of
507 // parse the number following it as loosely as the original hours
829 setHours(int hours) argument
[all...]
/libcore/ojluni/src/main/java/sun/util/calendar/
H A DCalendarDate.java74 private int hours; field in class:CalendarDate
219 return hours;
222 public CalendarDate setHours(int hours) { argument
223 if (this.hours != hours) {
224 this.hours = hours;
232 hours += n;
319 public CalendarDate setTimeOfDay(int hours, int minutes, int seconds, int millis) { argument
320 setHours(hours);
327 addTimeOfDay(int hours, int minutes, int seconds, int millis) argument
[all...]
H A DImmutableGregorianDate.java101 public CalendarDate setHours(int hours) { argument
157 public CalendarDate setTimeOfDay(int hours, int minutes, int seconds, int millis) { argument
161 public CalendarDate addTimeOfDay(int hours, int minutes, int seconds, int millis) { argument
/libcore/ojluni/src/test/java/time/tck/java/time/
H A DTCKZoneOffset.java640 private void doTestOffset(ZoneOffset offset, int hours, int minutes, int seconds) { argument
641 assertEquals(offset.getTotalSeconds(), hours * 60 * 60 + minutes * 60 + seconds);
643 if (hours == 0 && minutes == 0 && seconds == 0) {
646 String str = (hours < 0 || minutes < 0 || seconds < 0) ? "-" : "+";
647 str += Integer.toString(Math.abs(hours) + 100).substring(1);
657 assertEquals(offset, ZoneOffset.ofHoursMinutesSeconds(hours, minutes, seconds));
659 assertEquals(offset, ZoneOffset.ofHoursMinutes(hours, minutes));
661 assertEquals(offset, ZoneOffset.ofHours(hours));
H A DTCKDuration.java1212 public void plusHours_long(long hours, long amount, long expectedHours) { argument
1213 Duration t = Duration.ofHours(hours);
1831 public void minusHours_long(long hours, long amount, long expectedHours) { argument
1832 Duration t = Duration.ofHours(hours);

Completed in 283 milliseconds