DateTimeFormat class
A utility class for formatting DateTimes.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- 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
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
format(
DateTime dateTime, {String format = DateTimeFormats.iso8601}) → String -
Formats
dateTime
according to the notation format. -
relative(
DateTime dateTime, {DateTime? relativeTo, Duration? formatAfter, String format = AmericanDateTimeFormats.abbrWithComma, bool round = true, bool abbr = false, Map< UnitOfTime, String> ? abbreviations, int levelOfPrecision = 0, UnitOfTime minUnitOfTime = UnitOfTime.second, UnitOfTime maxUnitOfTime = UnitOfTime.year, bool excludeWeeks = false, String? ifNow, String? prependIfBefore, String? appendIfAfter}) → String -
Formats
dateTime
to a human-readable relative time format.