toLocaleTimeString

Returns a time as a string value appropriate to the host environment's current locale.

MDN Reference


fun toLocaleTimeString(locales: UnicodeBCP47LocaleIdentifier = definedExternally, options: DateTimeFormatOptions = definedExternally): String(source)

Converts a time to a string by using the current or specified locale.

Parameters

locales

A locale string, array of locale strings, Intl.Locale object, or array of Intl.Locale objects that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used.

options

An object that contains one or more properties that specify comparison options.

MDN Reference


fun toLocaleTimeString(locales: Locale, options: DateTimeFormatOptions = definedExternally): String(source)
fun toLocaleTimeString(locales: ReadonlyArray<Locale>, options: DateTimeFormatOptions = definedExternally): String(source)