TimeAgo class

Constructors

TimeAgo()

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 date, {String? locale, DateTime? now, Duration? max = const Duration(days: 14), bool short = false, bool withFuture = false}) String
Formats provided date to a fuzzy time like 'a moment ago'
formatShort(DateTime date, {String? locale, DateTime? now, Duration? max = const Duration(days: 14), bool withFuture = false}) String
Formats provided date to a fuzzy time like 5m
setDefaultLocale(String locale) → void
Sets the default locale. By default it is en.
setLocaleMessages(String locale, LookupMessages lookupMessages) → void
Sets a locale with the provided lookupMessages to be available when using the format function.