Time class
A Time
represents the time independent of whether it is in the UTC or local
timezone.
- Implemented types
- Annotations
-
- @immutable
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setteroverride
- hour → int
-
The hour.
final
- inMicroseconds → int
-
Returns
this
in microseconds.no setter - inMilliseconds → int
-
Returns
this
in milliseconds.no setter - microsecond → int
-
THe microsecond.
final
- millisecond → int
-
The millisecond.
final
- minute → int
-
The minute.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- second → int
-
The second.
final
Methods
-
compareTo(
Time other) → int -
Compares this object to another object.
override
-
difference(
Time other) → Duration -
Returns the difference between this and
other
. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator +(
Duration duration) → Time -
Adds the given
duration
to this time. A RangeError is thrown if the resultant time is less than min or greater than max. -
operator -(
Duration duration) → Time -
Subtracts the given
duration
from this time. A RangeError is thrown if the resultant time is less than min or greater than max. -
operator <(
Time other) → bool -
Returns
true
ifthis
is beforeother
andfalse
otherwise. -
operator <=(
Time other) → bool -
Returns
true
ifthis
is before or the same asother
andfalse
otherwise. -
operator ==(
Object other) → bool -
The equality operator.
override
-
operator >(
Time other) → bool -
Returns
true
ifthis
is afterother
andfalse
otherwise. -
operator >=(
Time other) → bool -
Returns
true
ifthis
is after or the same asother
andfalse
otherwise.