RelativeLocalDateOptions

data class RelativeLocalDateOptions(val style: RelativeUnitStyle = RelativeUnitStyle.LONG, val allowedDirections: Set<RelativeDirection> = RelativeDirection.entries.toSet(), val useRelativeDayOfWeek: Boolean = false) : RelativeUnitOptions(source)

Localization options for RelativeLocalDateLocalizer, LocalDate.localizeRelative, and LocalDate.localizeRelativeAsFlow.

Constructors

Link copied to clipboard
constructor(style: RelativeUnitStyle = RelativeUnitStyle.LONG, allowedDirections: Set<RelativeDirection> = RelativeDirection.entries.toSet(), useRelativeDayOfWeek: Boolean = false)

Properties

Link copied to clipboard

list of allowed relative directions to use for word style localization (e.g. yesterday'). Pass an empty list to force numeric localization (e.g. 1 day ago`). All directions are enabled by default.

Link copied to clipboard
open override val style: RelativeUnitStyle

the style of the date

Link copied to clipboard

whether to allow using relative day of week formatting (e.g. this Friday or next Monday). Disabled by default.