RelativeDateTimeController class

A controller class to calculate custom differences in time of two DateTime objects include on the provided relative date time.

Constructors

RelativeDateTimeController(RelativeDateTime relativeDateTime)
Creates a RelativeDateTimeController.
const

Properties

differenceInDuration Duration
Returns the difference of both date times as a Duration.
no setter
differenceMs int
The difference of both date times in miliseconds.
no setter
differenceMsAbs int
The absolute difference of both date times in miliseconds.
no setter
hashCode int
The hash code for this object.
no setterinherited
isNow bool
Returns whether the difference is not measurable (now).
no setter
isPast bool
Returns whether the other date time is before the provided date time.
no setter
relativeDateTime RelativeDateTime
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
timeDifference TimeDifference
Calculates the difference in time by converting it into a valid time unit and returns a TimeDifference.
no setter
validUnitDay bool
Returns whether the difference can be converted into the time unit day.
no setter
validUnitHour bool
Returns whether the difference can be converted into the time unit hour.
no setter
validUnitMinute bool
Returns whether the difference can be converted into the time unit minute.
no setter
validUnitMonth bool
Returns whether the difference can be converted into the time unit year.
no setter
validUnitSecond bool
Returns whether the difference can be converted into the time unit second.
no setter
validUnitWeek bool
Returns whether the difference can be converted into the time unit week.
no setter

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited