LocalTimeLocalizer

Localizer for LocalTime.

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

Note that only the hour is required when using TimeComponents.Local, all others are optional and can be omitted if so desired. In case of a "gap", the underlying implementation will try return a string containing only the required fields, which can be odd or unexpected in some locales. One example of such case is the last example below.

Example:

  • 9:05 PM

  • 9:05:08 PM

  • 21:05

  • 21:05:08.123

  • 9 at night

  • 9 PM (second: 8.1)

actual class LocalTimeLocalizer : DateTimeLocalizer<ERROR CLASS: Symbol not found for LocalTime> (source)

Localizer for LocalTime.

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

Note that only the hour is required when using TimeComponents.Local, all others are optional and can be omitted if so desired. In case of a "gap", the underlying implementation will try return a string containing only the required fields, which can be odd or unexpected in some locales. One example of such case is the last example below.

Example:

  • 9:05 PM

  • 9:05:08 PM

  • 21:05

  • 21:05:08.123

  • 9 at night

  • 9 PM (second: 8.1)

Localizer for LocalTime.

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

Note that only the hour is required when using TimeComponents.Local, all others are optional and can be omitted if so desired. In case of a "gap", the underlying implementation will try return a string containing only the required fields, which can be odd or unexpected in some locales. One example of such case is the last example below.

Example:

  • 9:05 PM

  • 9:05:08 PM

  • 21:05

  • 21:05:08.123

  • 9 at night

  • 9 PM (second: 8.1)

Constructors

Link copied to clipboard
expect constructor(options: LocalTimeOptions, locale: PlatformLocale = getDefaultLocale())
expect constructor(options: TimeStyleOptions.Local, locale: PlatformLocale = getDefaultLocale())
actual constructor(options: LocalTimeOptions, locale: PlatformLocale)
actual constructor(options: TimeStyleOptions.Local, locale: PlatformLocale)
actual constructor(options: TimeOptions<TimeStyleOptions.Local>, locale: PlatformLocale)
actual constructor(options: TimeStyleOptions.Local, locale: PlatformLocale)

Functions

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