RelativeDateAbsoluteTimeLocalizer
class RelativeDateAbsoluteTimeLocalizer(options: RelativeDateAbsoluteTimeOptions = RelativeDateAbsoluteTimeOptions(), locale: PlatformLocale = getDefaultLocale()) : PolyglotReferenceDateTimeLocalizer<LocalDateTime>
Localizes the date part of a LocalDateTime relative to a Zoned<Instant> reference point, and the time part absolutely.
This is mostly glue between RelativeLocalDateLocalizer and LocalTimeLocalizer. See their documentation to understand RelativeDateAbsoluteTimeOptions.dateOptions and RelativeDateAbsoluteTimeOptions.timeOptions.
Create once and re-use for localizing multiple values with the same options. Use localizeRelativeDateAbsoluteTime or localizeRelativeDateAbsoluteTimeAsFlow for one-off localizations.
Examples:
yesterday at 9:00 PMnext Sunday at 4:00 AMin 15 days, 3:00 AM21 days ago at 7:00 PM
Constructors
Link copied to clipboard
constructor(options: RelativeDateAbsoluteTimeOptions = RelativeDateAbsoluteTimeOptions(), locale: PlatformLocale = getDefaultLocale())