DateTimeRangeRelative class
Use the earliest and latest modifiers to specify custom and relative time ranges.
Examples:
- last year: DateTimeRange(earliest: '-1y@-y', latest: '-1y@y')
- the last 5 years: DateTimeRange(earliest: '-5y@-d', latest: 'now')
- this year: DateTimeRange(earliest: '@-y', latest: 'now')
- the last 7 days: DateTimeRange(earliest: '-7d@-d', latest: 'now')
- Implemented types
Constructors
- DateTimeRangeRelative({required String earliest, required String latest, DateTime? base})
-
const
Properties
- base → DateTime?
-
final
- earliest → DateTime?
-
no setteroverride
- earliestModifier → String
-
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- latest → DateTime?
-
no setteroverride
- latestModifier → String
-
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
phrase(
) → String? -
override
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited