Time class final

A quantity representing a duration of time.

Inheritance

Constructors

Time(double value, UnitOfMeasure<Time> unit)
Time.fromDuration(Duration d)
Creates a Time from a Dart Duration, using microseconds as the intermediate representation.
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
toDays Time
Converts this to days.
no setter
toDuration Duration
Converts this Time to a Dart Duration (via microseconds).
no setter
toHours Time
Converts this to hours.
no setter
toMicroseconds Time
Converts this to microseconds.
no setter
toMilliseconds Time
Converts this to milliseconds.
no setter
toMinutes Time
Converts this to minutes.
no setter
toNanoseconds Time
Converts this to nanoseconds.
no setter
toSeconds Time
Converts this to seconds.
no setter
unit UnitOfMeasure<Time>
The unit of measure that value is expressed in.
finalinherited
value double
The raw numeric value of this quantity expressed in unit.
finalinherited

Methods

equivalentTo(Quantity<Time> other) bool
Returns true if this quantity represents the same physical magnitude as other, regardless of which unit each is expressed in.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
to(UnitOfMeasure<Time> uom) double
Converts this quantity to uom and returns the raw double value.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator +(Time that) Time
Returns the sum of this quantity and that, expressed in unit.
inherited
operator -(Time that) Time
Returns the difference of this quantity and that, expressed in unit.
inherited
operator <(Time that) bool
Returns true if this quantity is less than that.
inherited
operator <=(Time that) bool
Returns true if this quantity is less than or equal to that.
inherited
operator ==(Object other) bool
The equality operator.
inherited
operator >(Time that) bool
Returns true if this quantity is greater than that.
inherited
operator >=(Time that) bool
Returns true if this quantity is greater than or equal to that.
inherited

Static Methods

parse(String s) → Option<Time>
Parses s into a Time, returning None if parsing fails.
override

Constants

days → const Days
Unit for days (d).
hours → const Hours
Unit for hours (h).
microseconds → const Microseconds
Unit for microseconds (µs).
milliseconds → const Milliseconds
Unit for milliseconds (ms).
minutes → const Minutes
Unit for minutes (min).
nanoseconds → const Nanoseconds
Unit for nanoseconds (ns).
seconds → const Seconds
Unit for seconds (s).
units → const Set<TimeUnit>
All supported Time units.