The toLocaleDateString()
method returns a string with a language-sensitive representation of the date portion of the specified date in the user agent's timezone. 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.