Home | History | Annotate | Download | only in time

Lines Matching refs:minutes

94  * This is usually a fixed number of hours and minutes.
110 * The fields of hours, minutes and seconds make assumptions that are valid for the
205 final int hours, minutes, seconds;
211 minutes = 0;
216 minutes = parseNumber(offsetId, 3, false);
221 minutes = parseNumber(offsetId, 4, true);
226 minutes = parseNumber(offsetId, 3, false);
231 minutes = parseNumber(offsetId, 4, true);
242 return ofHoursMinutesSeconds(-hours, -minutes, -seconds);
244 return ofHoursMinutesSeconds(hours, minutes, seconds);
282 * hours and minutes.
284 * The sign of the hours and minutes components must match.
285 * Thus, if the hours is negative, the minutes must be negative or zero.
286 * If the hours is zero, the minutes may be positive, negative or zero.
289 * @param minutes the time-zone offset in minutes, from 0 to ±59, sign matches hours
293 public static ZoneOffset ofHoursMinutes(int hours, int minutes) {
294 return ofHoursMinutesSeconds(hours, minutes, 0);
299 * hours, minutes and seconds.
301 * The sign of the hours, minutes and seconds components must match.
302 * Thus, if the hours is negative, the minutes and seconds must be negative or zero.
305 * @param minutes the time-zone offset in minutes, from 0 to ±59, sign matches hours and seconds
306 * @param seconds the time-zone offset in seconds, from 0 to ±59, sign matches hours and minutes
310 public static ZoneOffset ofHoursMinutesSeconds(int hours, int minutes, int seconds) {
311 validate(hours, minutes, seconds);
312 int totalSeconds = totalSeconds(hours, minutes, seconds);
352 * @param minutes the time-zone offset in minutes, from 0 to ±59
356 private static void validate(int hours, int minutes, int seconds) {
362 if (minutes < 0 || seconds < 0) {
363 throw new DateTimeException("Zone offset minutes and seconds must be positive because hours is positive");
366 if (minutes > 0 || seconds > 0) {
367 throw new DateTimeException("Zone offset minutes and seconds must be negative because hours is negative");
369 } else if ((minutes > 0 && seconds < 0) || (minutes < 0 && seconds > 0)) {
370 throw new DateTimeException("Zone offset minutes and seconds must have the same sign");
372 if (Math.abs(minutes) > 59) {
373 throw new DateTimeException("Zone offset minutes not in valid range: abs(value) " +
374 Math.abs(minutes) + " is not in the range 0 to 59");
380 if (Math.abs(hours) == 18 && (Math.abs(minutes) > 0 || Math.abs(seconds) > 0)) {
389 * @param minutes the time-zone offset in minutes, from 0 to &plusmn;59, sign matches hours and seconds
390 * @param seconds the time-zone offset in seconds, from 0 to &plusmn;59, sign matches hours and minutes
393 private static int totalSeconds(int hours, int minutes, int seconds) {
394 return hours * SECONDS_PER_HOUR + minutes * SECONDS_PER_MINUTE + seconds;
462 * It returns the total of the hours, minutes and seconds fields as a