Offset Time
A time of day with an offset from UTC.
Throws
if the offset is invalid
Constructors
Creates an OffsetTime.
Creates an OffsetTime by combining a Time and UtcOffset.
Types
Functions
Changes the offset of this OffsetTime, adjusting the time component such that the instant represented by it remains the same.
Compares to another OffsetTime based on timeline order, ignoring offset differences.
Returns a copy of this time with the values of any individual components replaced by the new values specified.
Returns this time with hours subtracted from it.
Returns this time with microseconds subtracted from it.
Returns this time with milliseconds subtracted from it.
Returns this time with minutes subtracted from it.
Returns this time with nanoseconds subtracted from it.
Returns this time with seconds subtracted from it.
Returns this time with duration subtracted from it.
Returns this time with hours added to it.
Returns this time with microseconds added to it.
Returns this time with milliseconds added to it.
Returns this time with minutes added to it.
Returns this time with nanoseconds added to it.
Returns this time with seconds added to it.
Returns this time with duration added to it.
Properties
The number of nanoseconds since the start of the day, but normalized to a UTC offset of zero, allowing OffsetTime objects with different offsets to be compared.
Extensions
Returns this time, rounded down to match the precision of a given unit.
Returns this time, rounded down to the nearest hour that satisfies the increment.
Returns this time, rounded down to the nearest minute that satisfies the increment.
Returns this time, rounded down to the nearest second that satisfies the increment.
Returns this time, rounded down to the nearest millisecond that satisfies the increment.
Returns this time, rounded down to the nearest microsecond that satisfies the increment.
Returns this time, rounded down to the nearest nanosecond that satisfies the increment.
Returns this time, rounded to the nearest hour that satisfies the increment. If the time is halfway between increments, it will be rounded up.
Returns this time, rounded to the nearest minute that satisfies the increment. If the time is halfway between increments, it will be rounded up.
Returns this time, rounded to the nearest second that satisfies the increment. If the time is halfway between increments, it will be rounded up.
Returns this time, rounded to the nearest millisecond that satisfies the increment. If the time is halfway between increments, it will be rounded up.
Returns this time, rounded to the nearest microsecond that satisfies the increment. If the time is halfway between increments, it will be rounded up.
Returns this time, rounded to the nearest nanosecond that satisfies the increment. If the time is halfway between increments, it will be rounded up.
Returns this time, rounded up to match the precision of a given unit.
Returns this time, rounded up to the nearest hour that satisfies the increment.
Returns this time, rounded up to the nearest minute that satisfies the increment.
Returns this time, rounded up to the nearest second that satisfies the increment.
Returns this time, rounded up to the nearest millisecond that satisfies the increment.
Returns this time, rounded up to the nearest microsecond that satisfies the increment.
Returns this time, rounded up to the nearest nanosecond that satisfies the increment.
Converts this time to an equivalent Java OffsetTime.
Converts this time to an equivalent NSDateComponents object.
Returns this time, rounded down to match the precision of a given unit.