RelativeDuration class
Represents an interval of time. RelativeDuration can contain both
absolute components (hours
, minutes
, seconds
, milliseconds
and
microseconds
) as in the Duration type, and also components which need
to be interpreted relative to a date (years
, months
, days
).
The absolute components are represented as single integer number of microseconds (same as Duration), with days and months being represented separately as their own integer numbers. (Years are converted and added to months). Each of the three components of the RelativeDuration may have its own sign.
Constructors
Properties
- days → int
-
The number of days spanned by the
days
component of this RelativeDuration.no setter - hashCode → int
-
The hash code for this object.
no setteroverride
- hours → int
-
The number of whole hours spanned by the absolute component of this
RelativeDuration.
no setter
- microseconds → int
-
The number of whole microseconds spanned by the absolute component of this
RelativeDuration.
no setter
- milliseconds → int
-
The number of whole milliseconds spanned by the absolute component of this
RelativeDuration.
no setter
- minutes → int
-
The number of whole minutes spanned by the absolute component of this
RelativeDuration.
no setter
- months → int
-
The number of months spanned by the
months
component of this RelativeDuration.no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- seconds → int
-
The number of whole seconds spanned by the absolute component of this
RelativeDuration.
no setter
- years → int
-
The number of whole years spanned by the
months
component of this RelativeDuration.no setter
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
Returns the duration in
ISO 8601 duration format.
override
Operators
-
operator ==(
Object other) → bool -
Whether all components of
this
RelativeDuration are equal to the respective components of theother
RelativeDuration.override