Package-level declarations

Types

Link copied to clipboard

Specialization of PolyglotValueLocalizer that allows to localize a date/time value T and returns a simple String.

Link copied to clipboard

Specialization of PolyglotValueLocalizer that allows to localize a Zoned date/time value T and returns a simple String.

Link copied to clipboard
sealed interface PolyglotLocalizer

Marker interface for all localizer classes of datetime-polyglot.

Link copied to clipboard

A generic PolyglotLocalizer that accepts a value of type T and a Zoned<Instant> reference point, and returns a TickingValue of type String.

Link copied to clipboard

A generic PolyglotLocalizer that accepts a just value of type T and returns a result of type R.

Functions

Link copied to clipboard
fun <T> PolyglotReferenceValueLocalizer<T>.localize(value: T, clock: Clock = Clock.System): TickingValue<String>

Localizes value by using the given clock's Clock.now as a reference point, rather than passing the reference explicitly.

Link copied to clipboard
fun <T> PolyglotReferenceValueLocalizer<T>.localizeAsFlow(value: T, clock: Clock = Clock.System, maxTick: Duration? = null): Flow<String>

Localizes value by using the given clock's Clock.now as a reference point and returns a Flow that emits updated values based on the underlying TickingValue.nextTick. This function assumes that the given clock moves forward linearly.