
Since: 1.4 Author: Stephen Colebourne See Also: Serialized FormĬonstant representing the maximum number of minutes that can be stored in this object.Ĭonstant representing the minimum number of minutes that can be stored in this object. Basic mathematical operations are provided. The number of minutes is set in the constructor, and may be queried using Type-safe way of representing a number of minutes in an application. It does not store years, months or hours for example. Minutes is an immutable period that can only store minutes.

Public final class Minutes extends BaseSingleFieldPeriodĪn immutable time period representing a number of minutes. T = LocalTime.SUMMARY: NESTED | FIELD | CONSTR | METHODĬlass Minutes .BaseSingleFieldPeriod All Implemented Interfaces: Serializable, Comparable, ReadablePeriod the recommended way with the JavaScript temporal Var t = LocalTime.ofInstant(Instant.ofEpochMilli(new Date().getTime())) T1.until(t2, ChronoUnit.SECONDS) // 9732 Convert a LocalTime from a moment or JavaScript Date // obtain a LocalTime instance from a JavaScript Date obtain the duration between the two dates T1.hashCode() != t2.hashCode() // true Distance between times var t1 = LocalTime.parse("11:00") T.truncatedTo(ChronoUnit.DAYS) // '00:00' Compare LocalTime instances var t1 = LocalTime.parse("11:55:42") T.truncatedTo(ChronoUnit.HALF_DAYS) // '12:00' T.truncatedTo(ChronoUnit.HOURS) // '23:00' T.plusSeconds(1).with(nextEvenSecond) // '11:55:44' Truncate a LocalTime instance var t = LocalTime.parse("23:55:42.123") Return t.second() % 2 = 0 ? t.plusSeconds(2) : t.plusSeconds(1) sample of a custom adjuster that adjust to the next even second
T.minus(Duration.ofMinutes(15)) // '11:40:42' Alter specific fields of a LocalTime instance var t = LocalTime.parse("11:55:42") add/subtract 1 million nanoseconds (1 millisecond)

any other time-based ChronoField is allowed as param for get Adding to/ subtracting from a LocalTime instance var t = LocalTime.parse("11:55:42")

T.get(ChronoField.MILLI_OF_SECOND) // 123 T.get(ChronoField.SECOND_OF_DAY) // 86142 obtain an instance of LocalTime from second of day obtain an instance of LocalTime from hour, minute, second, and nanosecond values
#Joda time minus minutes iso
obtain an instance of LocalTime from an ISO 8601 formatted text string obtain the current time in the UTC time zone, e.g. A LocalTime represents a time with no date and no time zone in the ISO-8601 calendar system, such as '10:15:30' Create a LocalTime instance // obtain the current time in the system default time zone, e.g.
