JavaScript · Dates and internationalisation

Intl.DateTimeFormat

A reusable, locale-aware date formatter. Create it once and call format many times.

Syntax
new Intl.DateTimeFormat(locale, options)

Example

Try it

More in this group

Date arithmetic date.getFullYear() Date.now() date.toISOString() date.toLocaleDateString() new Date()

Learn this in the course

Reference pages are the quick answer. The course explains the why, shows the full example and ends with a challenge.

Open the course