The ArabicMessages class provides Arabic language-specific
implementations of the Messages interface. This class is used to format
the "time ago" strings in Arabic.
The Data class holds all constant and runtime data used in the package.
This includes default locale settings, default messages, and a map of supported
locales along with their corresponding Messages implementations.
The DutchMessages class provides Dutch language-specific
implementations of the Messages interface. This class is used to format
the "time ago" strings in Dutch.
The EnglishMessages class provides English language-specific
implementations of the Messages interface. This class is used to format
the "time ago" strings in English.
The EspanaMessages class provides Spanish language-specific
implementations of the Messages interface. This class is used to format
the "time ago" strings in Spanish.
The FrenchMessages class provides French language-specific
implementations of the Messages interface. This class is used to format
the "time ago" strings in French.
The GermanMessages class provides German language-specific
implementations of the Messages interface. This class is used to format
the "time ago" strings in German.
The GetTimeAgo class provides functionality to format a DateTime object into a
human-readable "time ago" string such as "a minute ago", "5 days ago", etc.
It supports multiple locales and allows for custom locale messages.
You can also specify custom date formats for cases where the time difference is too large.
The class handles different time units such as seconds, minutes, hours, and days, and provides
localized messages accordingly.
The HindiMessages class provides Hindi language-specific
implementations of the Messages interface. This class is used to format
the "time ago" strings in Hindi.
The IndonesianMessages class provides Indonesian language-specific
implementations of the Messages interface. This class is used to format
the "time ago" strings in Indonesian.
The JapaneseMessages class provides Japanese language-specific
implementations of the Messages interface. This class is used to format
the "time ago" strings in Japanese.
The KoreanMessages class provides Korean language-specific
implementations of the Messages interface. This class is used to format
the "time ago" strings in Korean.
The Messages abstract class defines the interface for localization messages
used in formatting "time ago" strings. Implementations of this class should
provide specific messages for different time intervals (e.g., seconds, minutes, hours)
and optional prefix/suffix strings to be used in the final output.
The OccitanMessages class provides Occitan language-specific
implementations of the Messages interface. This class is used to format
the "time ago" strings in Occitan.
The PersianMessages class provides Persian language-specific
implementations of the Messages interface. This class is used to format
the "time ago" strings in Persian.
The PortugueseBrazilMessages class provides Portuguese(Brazil) language-specific
implementations of the Messages interface. This class is used to format
the "time ago" strings in Portuguese(Brazil).
The RomanianMessages class provides Romanian language-specific
implementations of the Messages interface. This class is used to format
the "time ago" strings in Romanian.
The SimplifiedChineseMessages class provides Chinese(Simplified) language-specific
implementations of the Messages interface. This class is used to format
the "time ago" strings in Chinese(Simplified).
The TraditionalChineseMessages class provides Chinese(Traditional) language-specific
implementations of the Messages interface. This class is used to format
the "time ago" strings in Chinese(Traditional).
The TurkishMessages class provides Turkish language-specific
implementations of the Messages interface. This class is used to format
the "time ago" strings in Turkish.
The UrduMessages class provides Urdu language-specific
implementations of the Messages interface. This class is used to format
the "time ago" strings in Urdu.
The VietnameseMessages class provides Vietnamese language-specific
implementations of the Messages interface. This class is used to format
the "time ago" strings in Vietnamese.
Utility function convertToUrduNumbers to convert an English number
into its Urdu numeral equivalent.
The function takes an integer input and replaces its English digits
(0-9) with corresponding Urdu digits.
Example: 123 -> '۱۲۳'
Helper method formatMessage to format a time message by combining the
prefix, msg (main message), and suffix. The method concatenates the
non-empty parts of the message using the Messages.wordSeparator() to join them.
Example: "about", "5 minutes", "ago" -> "about 5 minutes ago"