DurationLocalizer

Localizer for Duration.

This is meant to localize "static" duration, that don't change over time (e.g. a movie length).

For localizing durations that change over time see TickingDurationLocalizer. For localizing durations relatively, see RelativeDurationLocalizer.

Create once and re-use for localizing multiple values with the same options. Use Duration.localize for one-off localizations.

Examples:

  • 1h 5m

  • 1 hr, 5 min

  • 1 hour, 5 minutes

actual class DurationLocalizer : PolyglotValueLocalizer<ERROR CLASS: Symbol not found for Duration, String> (source)

Localizer for Duration.

This is meant to localize "static" duration, that don't change over time (e.g. a movie length).

For localizing durations that change over time see TickingDurationLocalizer. For localizing durations relatively, see RelativeDurationLocalizer.

Create once and re-use for localizing multiple values with the same options. Use Duration.localize for one-off localizations.

Examples:

  • 1h 5m

  • 1 hr, 5 min

  • 1 hour, 5 minutes

Localizer for Duration.

This is meant to localize "static" duration, that don't change over time (e.g. a movie length).

For localizing durations that change over time see TickingDurationLocalizer. For localizing durations relatively, see RelativeDurationLocalizer.

Create once and re-use for localizing multiple values with the same options. Use Duration.localize for one-off localizations.

Examples:

  • 1h 5m

  • 1 hr, 5 min

  • 1 hour, 5 minutes

Constructors

Link copied to clipboard
expect constructor(options: DurationOptions = DurationOptions(), locale: PlatformLocale = getDefaultLocale())
actual constructor(options: DurationOptions, locale: PlatformLocale)
actual constructor(options: DurationOptions, locale: PlatformLocale)

Functions

Link copied to clipboard
expect open override fun localize(value: Duration): String
abstract fun localize(value: ERROR CLASS: Symbol not found for Duration): String
actual open override fun localize(value: ERROR CLASS: Symbol not found for Duration): String
actual open override fun localize(value: Duration): String