formattedDate
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.
Parameters
instant
the point in time to display.
timeZone
the timezone to use for displaying the point in time.
dateStyle
the amount of data to include in the date component.
includeDurationFromNow
if true
, will include a textual representation of how far in the past or future the point in time is relative to the current time.
durationFromNowColor
the color to use for the duration from now component.