Package-level declarations

Types

Link copied to clipboard
data class DateComponents(val eraStyle: EraStyle? = null, val yearStyle: YearStyle = YearStyle.NUMERIC_PADDED_4_DIGITS, val monthStyle: MonthStyle, val dayOfMonthStyle: DayOfMonthStyle, val dayOfWeekStyle: DayOfWeekStyle? = null) : DateStyleOptions, ComponentsOptions.Date.Components

Class defining the style for each component of a date (year, month and day).

Link copied to clipboard
data class DateOptions(val styleOptions: DateStyleOptions)

Simple container class for DateStyleOptions.

Link copied to clipboard

Defines a preset date style for localizing a date (year, month and day).

Link copied to clipboard
sealed interface DateStyleOptions

Defines the format style for a date (year, month and day).

Link copied to clipboard
actual class LocalDateLocalizer : DateTimeLocalizer<ERROR CLASS: Symbol not found for LocalDate>

Localizer for LocalDate.

Link copied to clipboard
actual class LocalDateTimeLocalizer : DateTimeLocalizer<ERROR CLASS: Symbol not found for LocalDateTime>

Localizer for LocalDateTime.

Link copied to clipboard

Localization options for LocalDateTimeLocalizer and LocalDateTime.parse.

Link copied to clipboard
actual class LocalTimeLocalizer : DateTimeLocalizer<ERROR CLASS: Symbol not found for LocalTime>

Localizer for LocalTime.

Link copied to clipboard
sealed interface TimeComponents : TimeStyleOptions

Interface defining the style for each component of a time.

Link copied to clipboard
data class TimeOptions<out SO : TimeStyleOptions>(val styleOptions: SO, val hourCycle: HourCycle? = null)

Options to pass when formatting time.

Link copied to clipboard
sealed interface TimeStyle : TimeStyleOptions

Defines a preset time style for localizing a time.

Link copied to clipboard
sealed interface TimeStyleOptions

Options to pass to TimeOptions.styleOptions, that define the style of each time component.

Link copied to clipboard

Localizer for years (Int).

Localizer for years (Int).

Localizer for years (Int).

Link copied to clipboard
actual class YearMonthLocalizer : DateTimeLocalizer<ERROR CLASS: Symbol not found for YearMonth>

Localizer for YearMonth.

Link copied to clipboard
data class YearMonthOptions(val eraStyle: EraStyle? = null, val yearStyle: YearStyle = YearStyle.NUMERIC, val monthStyle: MonthStyle?) : ComponentsOptions.Date.Components

Localization options for YearMonthLocalizer and YearMonth.parse.

Link copied to clipboard
data class YearOptions(val eraStyle: EraStyle? = null, val yearStyle: YearStyle = YearStyle.NUMERIC) : ComponentsOptions.Date.Components

Localization options for YearLocalizer.

Link copied to clipboard

Localizer for an Instant paired with a TimeZone (see Zoned).

actual class ZonedInstantLocalizer : DateTimeZonedLocalizer<ERROR CLASS: Symbol not found for Instant>

Localizer for an Instant paired with a TimeZone (see Zoned).

Localizer for an Instant paired with a TimeZone (see Zoned).

Link copied to clipboard

Localization options for ZonedInstantLocalizer and Zoned.localize (where Zoned is of type Instant).

Functions

Link copied to clipboard

Allows creation of mixed style and components between date and time, which is not possible in all platforms

Link copied to clipboard
fun Zoned<Instant>.localize(options: ZonedInstantOptions, locale: PlatformLocale = getDefaultLocale()): String

Localizes this Instant at this TimeZone with the given options in the given locale.

fun LocalDate.localize(options: DateStyleOptions, locale: PlatformLocale = getDefaultLocale()): String

Localizes this LocalDate with the given options in the given locale.

fun LocalDateTime.localize(options: LocalDateTimeOptions, locale: PlatformLocale = getDefaultLocale()): String

Localizes this LocalDateTime with the given options in the given locale.

fun LocalTime.localize(options: LocalTimeOptions, locale: PlatformLocale = getDefaultLocale()): String
fun LocalTime.localize(options: TimeStyleOptions.Local, locale: PlatformLocale = getDefaultLocale()): String

Localizes this LocalTime with the given options in the given locale.

fun YearMonth.localize(options: YearMonthOptions, locale: PlatformLocale = getDefaultLocale()): String

Localizes this YearMonth with the given options in the given locale.