DynamicLocalDateLocalizer
class DynamicLocalDateLocalizer(options: DynamicLocalDateOptions, locale: PlatformLocale = getDefaultLocale()) : PolyglotReferenceValueLocalizer<LocalDate> (source)
Localizes a LocalDate dynamically (either absolute or relative to a Zoned<Instant> reference point).
This class chooses between formatting with a RelativeLocalDateLocalizer (if the difference is within the configured range), or falls back to absolute formatting via LocalDateLocalizer.
Create once and re-use for localizing multiple values with the same options. Use LocalDate.localizeDynamic or LocalDate.localizeDynamicAsFlow for one-off localizations.
Examples:
yesterday1 day agoin 5 days01/01/2026January 1 2026
See also
Functions
Link copied to clipboard
fun <T> PolyglotReferenceValueLocalizer<T>.localizeAsFlow(value: T, clock: Clock = Clock.System, maxTick: Duration? = null): Flow<String>