DateDuration class

Represents an interval of time in days and months. DateDuration unlike RelativeDuration does not contain an absolute time component. (ie. hours, minutes, seconds, milliseconds and microseconds).

Days and months are represented separately as their own integer numbers. (Years are converted and added to months). Each of the the components of the DateDuration may have its own sign.

Constructors

DateDuration({int years = 0, int months = 0, int days = 0})

Properties

days int
The number of days spanned by the days component of this DateDuration.
no setter
hashCode int
The hash code for this object.
no setteroverride
months int
The number of months spanned by the months component of this DateDuration.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
years int
The number of whole years spanned by the months component of this DateDuration.
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 DateDuration are equal to the respective components of the other DateDuration.
override