RelativeDateTime class
A model
class describing a TimeDifference based on two comparable
DateTime objects.
If the calculated TimeDifference's value is negative, the compared DateTime is in the future.
Constructors
- RelativeDateTime({required DateTime dateTime, required DateTime other})
- Creates a RelativeDateTime.
Properties
- dateTime → DateTime
-
final
- differenceInDuration → Duration
-
Returns the calculated difference in time as a Duration.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- isNow → bool
-
States whether the difference is immeasurable (no difference).
no setter
- isPast → bool
-
States whether the other date time is in the past.
no setter
- other → DateTime
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- timeDifference → TimeDifference
-
Returns the calculated TimeDifference.
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