The toLocaleTimeString()
method returns a string with a language-sensitive representation of the time portion of the date. In implementations with Intl.DateTimeFormat
API support, this method simply calls Intl.DateTimeFormat
.
When formatting large numbers of dates, it is better to create an Intl.DateTimeFormat
object and use its format()
method.