DynamicYearMonthLocalizer
class DynamicYearMonthLocalizer(options: DynamicYearMonthOptions, locale: PlatformLocale = getDefaultLocale()) : PolyglotReferenceValueLocalizer<YearMonth> (source)
Localizes a YearMonth dynamically (either absolute or relative to a Zoned<Instant> reference point).
This class chooses between formatting with a RelativeYearMonthLocalizer (if the difference is within the configured range), or falls back to absolute formatting via YearMonthLocalizer.
Create once and re-use for localizing multiple values with the same options. Use YearMonth.localizeDynamic or YearMonth.localizeDynamicAsFlow for one-off localizations.
Examples:
last month1 month agoin 5 mo07/2026July 2026
See also
Functions
Link copied to clipboard
fun <T> PolyglotReferenceValueLocalizer<T>.localizeAsFlow(value: T, clock: Clock = Clock.System, maxTick: Duration? = null): Flow<String>