TimeAgo
TimeAgo is an Object that converts a date into a humanized text. Instead of showing a date 2020-12-12 18:30 with timeago you can display something like "now", "an hour ago", "~1y", etc
Note: This class uses ISO 639-1 language code to identify the language. For more information see ISO 639-1.
Example:
TimeAgo.setDefaultLocale("fa")
TimeAgo.format(now()) // "چند لحظه پیش"Since
1.1.0
See also
Functions
Formats provided date to a fuzzy time like 'a moment ago'.
Sets the default locale. By default, it is en.
Sets locales with the auto provided LookupMessages to be available when using the format function.
Sets a locale with the auto provided LookupMessages to be available when using the format function.
Sets a locale with the provided lookupMessages to be available when using the format function.
Sets a locale with the auto provided LookupMessages to be available when using the format function. also Sets the default locale.