TimeText
fun TimeText(time: Date, modifier: Modifier = Modifier, showSeconds: Boolean = false, locale: Locale = Locale.current, format: TimeFormat = timeFormatForLocale(locale), style: TextStyle = TextStyle.Default)
A composable function to display formatted time as text.
Parameters
time
The Date value to be presented by this component.
modifier
The Modifier applied to the Text
element used by this component.
showSeconds
Whether the displayed text should include seconds. Defaults to false
.
locale
The Locale used to determine the time format (12-hour or 24-hour). Defaults to Locale.current
.
format
The TimeFormat (either 12-hour or 24-hour) used to format the time. By default, it is determined automatically based on the provided locale. If this parameter is explicitly set, it takes priority over the auto-detection based on the locale.
style
The TextStyle applied to the Text
element used by this component. Defaults to TextStyle.Default.