Getting the date right in Javascript in your language of choice

August 20th, 2020

The Internationalization API provides language number formatting, string comparison, and date/time formatting in Javascript. It’s a global object.

Intl.DateTimeFormat('en-GB',
{
day: '2-digit',
hour: '2-digit',
minute: '2-digit',
second: '2-digit',
weekday: 'long',
era: 'long',
year: 'numeric' ,
month: 'long',
timeZoneName: 'long',
hour12: false
}).format()

What is the time today?

Leave a Reply