RelativeDateFormat class

RelativeDateFormat localizes relative time stamps using the provided Locale.

Following languages are supported by default at the moment:

  • English
  • German
  • Russian

If the provided Locale can not be applied to the supported localizations, the default localization will be returned instead.

Constructors

RelativeDateFormat(Locale locale, {List<RelativeDateLocalization> localizations = LOC_ALL, bool debug = false})
Creates a RelativeDateFormat.
const

Properties

debug bool
States whether to print debug output.
final
hashCode int
The hash code for this object.
no setterinherited
locale Locale
The device Locale on which the localized string will be based on.
final
localizations List<RelativeDateLocalization>
The localizations available for formatting.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

format(RelativeDateTime relativeDateTime) String
Returns a localized String formatting the RelativeDateTime in human-readable form.
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