Package-level declarations

Types

Link copied to clipboard
class DynamicDateAbsoluteTimeLocalizer(options: DynamicDateAbsoluteTimeOptions = DynamicDateAbsoluteTimeOptions(), locale: PlatformLocale = getDefaultLocale()) : PolyglotReferenceDateTimeLocalizer<LocalDateTime>

Localizes a LocalDateTime dynamically (either absolute or relative to a Zoned<Instant> reference point).

Link copied to clipboard
data class DynamicDateAbsoluteTimeOptions(val relativeOptions: RelativeDateAbsoluteTimeOptions = RelativeDateAbsoluteTimeOptions(), val absoluteOptions: LocalDateTimeOptions = LocalDateTimeOptions(), val relativeDateDiffRange: IntRange = DynamicLocalDateOptions.DEFAULT_DIFF_RANGE) : PolyglotLocalizerOptions<DynamicDateAbsoluteTimeLocalizer>

Localization options for DynamicDateAbsoluteTimeLocalizer.

Link copied to clipboard
class DynamicLocalDateLocalizer(options: DynamicLocalDateOptions = DynamicLocalDateOptions(), locale: PlatformLocale = getDefaultLocale()) : PolyglotReferenceDateTimeLocalizer<LocalDate>

Localizes a LocalDate dynamically (either absolute or relative to a Zoned<Instant> reference point).

Link copied to clipboard

Special localizer class that allows to pick an arbitrary PolyglotReferenceDateTimeLocalizer based on the current reference time.

Link copied to clipboard
class DynamicYearLocalizer(options: DynamicYearOptions = DynamicYearOptions(), locale: PlatformLocale = getDefaultLocale()) : PolyglotReferenceDateTimeLocalizer<Int>

Localizes a year dynamically (either absolute or relative to a Zoned<Instant> reference point).

Link copied to clipboard
class DynamicYearMonthLocalizer(options: DynamicYearMonthOptions = DynamicYearMonthOptions(), locale: PlatformLocale = getDefaultLocale()) : PolyglotReferenceDateTimeLocalizer<YearMonth>

Localizes a YearMonth dynamically (either absolute or relative to a Zoned<Instant> reference point).

Link copied to clipboard
data class DynamicYearMonthOptions(val relativeOptions: RelativeYearMonthOptions = RelativeYearMonthOptions(), val absoluteOptions: YearMonthOptions = YearMonthOptions(), val relativeDiffRange: IntRange = -1..1) : PolyglotLocalizerOptions<DynamicYearMonthLocalizer>

Localization options for DynamicYearMonthLocalizer.

Link copied to clipboard
data class DynamicYearOptions(val relativeOptions: RelativeYearOptions = RelativeYearOptions(), val absoluteOptions: YearOptions = YearOptions(), val relativeDiffRange: IntRange = -1..1) : PolyglotLocalizerOptions<DynamicYearLocalizer>

Localization options for DynamicYearLocalizer.

Link copied to clipboard

Localizes a Zoned year (Zoned<Int>) dynamically (either absolute or relative to a Zoned<Instant> reference point).

Link copied to clipboard
data class DynamicZonedYearOptions(val relativeOptions: RelativeZonedYearOptions = RelativeZonedYearOptions(), val absoluteOptions: ZonedYearOptions = ZonedYearOptions(), val relativeDiffRange: IntRange = -1..1) : PolyglotLocalizerOptions<DynamicZonedYearLocalizer>

Localization options for DynamicZonedYearLocalizer.

Link copied to clipboard
@RequiresOptIn(message = "This API is experimental. It could change or be dropped in the future without notice.")
annotation class ExperimentalDynamicLocalizer

Functions

Link copied to clipboard
fun LocalDate.localizeDynamic(reference: Zoned<Instant>, options: DynamicLocalDateOptions = DynamicLocalDateOptions(), locale: PlatformLocale = getDefaultLocale()): TickingValue<String>

Localizes this LocalDate dynamically (either absolute or relative to a Zoned<Instant> reference point) with the given options in the given locale.

fun YearMonth.localizeDynamic(reference: Zoned<Instant>, options: DynamicYearMonthOptions = DynamicYearMonthOptions(), locale: PlatformLocale = getDefaultLocale()): TickingValue<String>

Localizes this YearMonth dynamically (either absolute or relative to a Zoned<Instant> reference point) with the given options in the given locale.

Link copied to clipboard
fun LocalDate.localizeDynamicAsFlow(options: DynamicLocalDateOptions = DynamicLocalDateOptions(), locale: PlatformLocale = getDefaultLocale(), clock: Flow<ClockWrapper> = SYSTEM_CLOCK, timeZone: Flow<TimeZone> = SYSTEM_TIMEZONE): Flow<String>

Localizes this LocalDate dynamically (either absolute or relative to clock @ timeZone) with the given options in the given locale, returning a Flow that automatically receives new localizations as they are needed.

fun YearMonth.localizeDynamicAsFlow(options: DynamicYearMonthOptions = DynamicYearMonthOptions(), locale: PlatformLocale = getDefaultLocale(), clock: Flow<ClockWrapper> = SYSTEM_CLOCK, timeZone: Flow<TimeZone> = SYSTEM_TIMEZONE): Flow<String>

Localizes this YearMonth dynamically (either absolute or relative to clock @ timeZone) with the given options in the given locale, returning a Flow that automatically receives new localizations as they are needed.

Link copied to clipboard
fun LocalDateTime.localizeDynamicDateAbsoluteTime(reference: Zoned<Instant>, options: DynamicDateAbsoluteTimeOptions = DynamicDateAbsoluteTimeOptions(), locale: PlatformLocale = getDefaultLocale()): TickingValue<String>

Localizes this LocalDateTime dynamically (either absolute or relative to a Zoned<Instant> reference point) with the given options in the given locale.

Link copied to clipboard
fun LocalDateTime.localizeDynamicDateAbsoluteTimeAsFlow(options: DynamicDateAbsoluteTimeOptions = DynamicDateAbsoluteTimeOptions(), locale: PlatformLocale = getDefaultLocale(), clock: Flow<ClockWrapper> = SYSTEM_CLOCK, timeZone: Flow<TimeZone> = SYSTEM_TIMEZONE): Flow<String>

Localizes this LocalDateTime dynamically (either absolute or relative to clock @ timeZone) with the given options in the given locale, returning a Flow that automatically receives new localizations as they are needed.

Link copied to clipboard
fun LocalDateTime.localizeDynamicDateAbsoluteTimeNow(options: DynamicDateAbsoluteTimeOptions = DynamicDateAbsoluteTimeOptions(), locale: PlatformLocale = getDefaultLocale(), clock: Clock = Clock.System, timeZone: TimeZone = TimeZone.currentSystemDefault()): TickingValue<String>

Localizes this LocalDateTime dynamically (either absolute or relative to clock @ timeZone) with the given options in the given locale.

Link copied to clipboard
fun LocalDate.localizeDynamicNow(options: DynamicLocalDateOptions = DynamicLocalDateOptions(), locale: PlatformLocale = getDefaultLocale(), clock: Clock = Clock.System, timeZone: TimeZone = TimeZone.currentSystemDefault()): TickingValue<String>

Localizes this LocalDate dynamically (either absolute or relative to clock @ timeZone) with the given options in the given locale.

fun YearMonth.localizeDynamicNow(options: DynamicYearMonthOptions = DynamicYearMonthOptions(), locale: PlatformLocale = getDefaultLocale(), clock: Clock = Clock.System, timeZone: TimeZone = TimeZone.currentSystemDefault()): TickingValue<String>

Localizes this YearMonth dynamically (either absolute or relative to clock @ timeZone) with the given options in the given locale.