Package-level declarations

Functions

Link copied to clipboard
fun durationFromNowText(instant: Instant, now: Instant = Clock.System.now()): String

Format time interval to the time instant in human-readable way, such as "3 days and 5 hours ago" or "4 months and 3 days from now".

Link copied to clipboard
fun formattedDate(instant: Instant, timeZone: TimeZone = TimeZone.currentSystemDefault(), dateStyle: FormatStyle = FormatStyle.MEDIUM, includeDurationFromNow: Boolean = false, durationFromNowColor: Color = MaterialTheme.colorScheme.secondary): AnnotatedString

Formats a string to display a point in time as a date.

Link copied to clipboard
fun formattedDateTime(instant: Instant, timeZone: TimeZone = TimeZone.currentSystemDefault(), dateStyle: FormatStyle = FormatStyle.MEDIUM, timeStyle: FormatStyle = FormatStyle.MEDIUM, includeDurationFromNow: Boolean = false, durationFromNowColor: Color = MaterialTheme.colorScheme.secondary): AnnotatedString

Formats a string to display a point in time as a date and time string.