Satisfied Interfaces: Comparable<Time>, Enumerable<Time>, Ordinal<Other>, ReadableTime, TimeBehavior<Time>
Direct Known Satisfying Classes: TimeOfDay

Time of day like 6pm or 8.30am.

This type contains only information about an abstract time of day without referencing any date or timezone.

You use Time to specify something that has to occur on a specific time of day like “lunch hour starts at 1pm” or “shop opens at 10am”.

Inherited Attributes
Attributes inherited from: Object
hash, string
Attributes inherited from: Enumerable<Other>
integerValue
Attributes inherited from: Ordinal<Other>
predecessor, successor
Attributes inherited from: ReadableTime
Methods
minusSource Code
shared formal Time minus(ReadableTimePeriod period)

Subtracts a period of time to this time of day value.

Result of this operation is another time of day, wrapping around 12 a.m. (midnight) if necessary.

periodFromSource Code
shared formal Period periodFrom(Time start)

Returns the period between this and the given time. If this time is before the given time then return zero period.

periodToSource Code
shared formal Period periodTo(Time end)

Returns the period between this and the given time. If this time is after the given time then return zero period.

plusSource Code
shared formal Time plus(ReadableTimePeriod period)

Adds a period of time to this time of day value.

Result of this operation is another time of day, wrapping around 12 a.m. (midnight) if necessary.

rangeToSource Code
shared formal TimeRange rangeTo(Time other)

Returns the TimeRange between this and given Time.

Inherited Methods
Methods inherited from: Object
equals
Methods inherited from: Comparable<Other>
compare
Methods inherited from: TimeBehavior<Element>