Intl.DateTimeFormat
Browser support
Full support
Browser support
Full support
Available in Chrome from version 24 Chrome
Available in Edge from version 12 Edge
Available in Firefox from version 29 Firefox
Available in Opera from version 15 Opera
Available in Safari from version 10 Safari
Available in Chrome Android from version 25 Chrome Android
Available in Firefox for Android from version 56 Firefox for Android
Available in Opera Android from version 14 Opera Android
Available in Safari on iOS from version 10 Safari on iOS
Available in Samsung Internet from version 1.5 Samsung Internet
Available in WebView Android from version 4.4 WebView Android
Available in WebView on iOS from version 10 WebView on iOS
Available in Deno from version 1.8 Deno
Available in Node.js from version 0.12.0 Node.js
Input
Alternativ use
Intl.DateTimeFormat can also be used from Date.prototype.toLocaleString()
new Date("2022-04-24T19:00")
.toLocaleString(undefined)
4/24/2022, 7:00:00 PM
Output
dateStyle
Browser support
Browser support
Available in Chrome from version 76 Chrome
Available in Edge from version 79 Edge
Available in Firefox from version 79 Firefox
Available in Opera from version 63 Opera
Available in Safari from version 14.1 Safari
Available in Chrome Android from version 76 Chrome Android
Available in Firefox for Android from version 79 Firefox for Android
Available in Opera Android from version 54 Opera Android
Available in Safari on iOS from version 14.5 Safari on iOS
Available in Samsung Internet from version 12.0 Samsung Internet
Available in WebView Android from version 76 WebView Android
Available in WebView on iOS from version 14.5 WebView on iOS
Available in Deno from version 1.8 Deno
Available in Node.js from version 12.9.0 Node.js
{
dateStyle: "full"
}
Sunday, April 24, 2022
{
dateStyle: "long"
}
April 24, 2022
{
dateStyle: "medium"
}
Apr 24, 2022
{
dateStyle: "short"
}
4/24/22
timeStyle
Browser support
Browser support
Available in Chrome from version 76 Chrome
Available in Edge from version 79 Edge
Available in Firefox from version 79 Firefox
Available in Opera from version 63 Opera
Available in Safari from version 14.1 Safari
Available in Chrome Android from version 76 Chrome Android
Available in Firefox for Android from version 79 Firefox for Android
Available in Opera Android from version 54 Opera Android
Available in Safari on iOS from version 14.5 Safari on iOS
Available in Samsung Internet from version 12.0 Samsung Internet
Available in WebView Android from version 76 WebView Android
Available in WebView on iOS from version 14.5 WebView on iOS
Available in Deno from version 1.8 Deno
Available in Node.js from version 12.9.0 Node.js
{
timeStyle: "full"
}
7:00:00 PM Coordinated Universal Time
{
timeStyle: "long"
}
7:00:00 PM UTC
{
timeStyle: "medium"
}
7:00:00 PM
{
timeStyle: "short"
}
7:00 PM
year
{
year: "numeric"
}
2022
{
year: "2-digit"
}
22
month
{
month: "numeric"
}
4
{
month: "2-digit"
}
04
{
month: "long"
}
April
{
month: "short"
}
Apr
{
month: "narrow"
}
A
day
{
day: "numeric"
}
24
{
day: "2-digit"
}
24
hour
{
hour: "numeric"
}
7 PM
{
hour: "2-digit"
}
07 PM
minute
{
minute: "numeric"
}
0
{
minute: "2-digit"
}
0
second
{
second: "numeric"
}
0
{
second: "2-digit"
}
0
weekday
{
weekday: "long"
}
Sunday
{
weekday: "short"
}
Sun
{
weekday: "narrow"
}
S
era
{
era: "long"
}
4/24/2022 Anno Domini
{
era: "short"
}
4/24/2022 AD
{
era: "narrow"
}
4/24/2022 A
hour12
{
hour12: true
}
7:00:00 PM
{
hour12: false
}
19:00:00
hourCycle
Browser support
Browser support
Available in Chrome from version 73 Chrome
Available in Edge from version 18 Edge
Available in Firefox from version 58 Firefox
Available in Opera from version 60 Opera
Available in Safari from version 13 Safari
Available in Chrome Android from version 73 Chrome Android
Available in Firefox for Android from version 58 Firefox for Android
Available in Opera Android from version 52 Opera Android
Available in Safari on iOS from version 13 Safari on iOS
Available in Samsung Internet from version 11.0 Samsung Internet
Available in WebView Android from version 73 WebView Android
Available in WebView on iOS from version 13 WebView on iOS
Available in Deno from version 1.8 Deno
Available in Node.js from version 12.0.0 Node.js
{
hourCycle: "h11"
}
7:00:00 PM
{
hourCycle: "h12"
}
7:00:00 PM
{
hourCycle: "h23"
}
19:00:00
{
hourCycle: "h24"
}
19:00:00
dayPeriod
Browser support
Partial support
Browser support
Partial support
Available in Chrome from version 92 Chrome
Available in Edge from version 92 Edge
Available in Firefox from version 90 Firefox
Available in Opera from version 78 Opera
Available in Safari from version 14.1 Safari
Available in Chrome Android from version 92 Chrome Android
Available in Firefox for Android from version 90 Firefox for Android
Not available in Opera Android Opera Android
Available in Safari on iOS from version 14.5 Safari on iOS
Available in Samsung Internet from version 16.0 Samsung Internet
Available in WebView Android from version 92 WebView Android
Available in WebView on iOS from version 14.5 WebView on iOS
Available in Deno from version 1.12 Deno
Not available in Node.js Node.js
{
dayPeriod: "long"
}
in the evening
{
dayPeriod: "short"
}
in the evening
{
dayPeriod: "narrow"
}
in the evening
fractionalSecondDigits
Browser support
Browser support
Available in Chrome from version 84 Chrome
Available in Edge from version 84 Edge
Available in Firefox from version 84 Firefox
Available in Opera from version 70 Opera
Available in Safari from version 14.1 Safari
Available in Chrome Android from version 84 Chrome Android
Available in Firefox for Android from version 84 Firefox for Android
Available in Opera Android from version 60 Opera Android
Available in Safari on iOS from version 14.5 Safari on iOS
Available in Samsung Internet from version 14.0 Samsung Internet
Available in WebView Android from version 84 WebView Android
Available in WebView on iOS from version 14.5 WebView on iOS
Available in Deno from version 1.8 Deno
Available in Node.js from version 14.6.0 Node.js
{
fractionalSecondDigits: 1
}
0.0
{
fractionalSecondDigits: 2
}
0.00
{
fractionalSecondDigits: 3
}
0.000
calendar
Browser support
Browser support
Available in Chrome from version 80 Chrome
Available in Edge from version 80 Edge
Available in Firefox from version 76 Firefox
Available in Opera from version 67 Opera
Available in Safari from version 14.1 Safari
Available in Chrome Android from version 80 Chrome Android
Available in Firefox for Android from version 79 Firefox for Android
Available in Opera Android from version 57 Opera Android
Available in Safari on iOS from version 14.5 Safari on iOS
Available in Samsung Internet from version 13.0 Samsung Internet
Available in WebView Android from version 80 WebView Android
Available in WebView on iOS from version 14.5 WebView on iOS
Available in Deno from version 1.8 Deno
Available in Node.js from version 14.0.0 Node.js
{
calendar: "buddhist"
}
4/24/2565 BE
{
calendar: "chinese"
}
2022-03-24
{
calendar: "coptic"
}
8/16/1738 ERA1
{
calendar: "ethiopia"
}
4/24/2022
{
calendar: "ethiopic"
}
8/16/2014 ERA1
{
calendar: "gregory"
}
4/24/2022
{
calendar: "hebrew"
}
23 Nisan 5782
{
calendar: "indian"
}
2/4/1944 Saka
{
calendar: "islamic"
}
9/23/1443 AH
{
calendar: "iso8601"
}
4/24/2022
{
calendar: "japanese"
}
4/24/4 R
{
calendar: "persian"
}
2/4/1401 AP
{
calendar: "roc"
}
4/24/111 Minguo
numberingSystem
Browser support
Browser support
Available in Chrome from version 80 Chrome
Available in Edge from version 80 Edge
Available in Firefox from version 76 Firefox
Available in Opera from version 67 Opera
Available in Safari from version 14.1 Safari
Available in Chrome Android from version 80 Chrome Android
Available in Firefox for Android from version 79 Firefox for Android
Available in Opera Android from version 57 Opera Android
Available in Safari on iOS from version 14.5 Safari on iOS
Available in Samsung Internet from version 13.0 Samsung Internet
Available in WebView Android from version 80 WebView Android
Available in WebView on iOS from version 14.5 WebView on iOS
Available in Deno from version 1.8 Deno
Available in Node.js from version 14.0.0 Node.js
{
numberingSystem: "arab"
}
٤/٢٤/٢٠٢٢
{
numberingSystem: "arabext"
}
۴/۲۴/۲۰۲۲
{
numberingSystem: "bali"
}
᭔/᭒᭔/᭒᭐᭒᭒
{
numberingSystem: "beng"
}
৪/২৪/২০২২
{
numberingSystem: "deva"
}
४/२४/२०२२
{
numberingSystem: "fullwide"
}
4/24/2022
{
numberingSystem: "gujr"
}
૪/૨૪/૨૦૨૨
{
numberingSystem: "guru"
}
੪/੨੪/੨੦੨੨
{
numberingSystem: "hanidec"
}
四/二四/二〇二二
{
numberingSystem: "khmr"
}
៤/២៤/២០២២
{
numberingSystem: "knda"
}
೪/೨೪/೨೦೨೨
{
numberingSystem: "laoo"
}
໔/໒໔/໒໐໒໒
{
numberingSystem: "latn"
}
4/24/2022
{
numberingSystem: "limb"
}
᥊/᥈᥊/᥈᥆᥈᥈
{
numberingSystem: "mlym"
}
൪/൨൪/൨൦൨൨
{
numberingSystem: "mong"
}
᠔/᠒᠔/᠒᠐᠒᠒
{
numberingSystem: "mymr"
}
၄/၂၄/၂၀၂၂
{
numberingSystem: "orya"
}
୪/୨୪/୨୦୨୨
{
numberingSystem: "tamldec"
}
௪/௨௪/௨௦௨௨
{
numberingSystem: "telu"
}
౪/౨౪/౨౦౨౨
{
numberingSystem: "thai"
}
๔/๒๔/๒๐๒๒
{
numberingSystem: "tibt"
}
༤/༢༤/༢༠༢༢
timeZoneName
Browser support
Browser support
Available in Chrome from version 24 Chrome
Available in Edge from version 12 Edge
Available in Firefox from version 29 Firefox
Available in Opera from version 15 Opera
Available in Safari from version 10 Safari
Available in Chrome Android from version 25 Chrome Android
Available in Firefox for Android from version 56 Firefox for Android
Available in Opera Android from version 14 Opera Android
Available in Safari on iOS from version 10 Safari on iOS
Available in Samsung Internet from version 1.5 Samsung Internet
Available in WebView Android from version 4.4 WebView Android
Available in WebView on iOS from version 10 WebView on iOS
Available in Deno from version 1.8 Deno
Available in Node.js from version 0.12.0 Node.js
{
timeZoneName: "long"
}
4/24/2022, Coordinated Universal Time
{
timeZoneName: "short"
}
4/24/2022, UTC
{
timeZoneName: "shortOffset"
}
4/24/2022, GMT
{
timeZoneName: "longOffset"
}
4/24/2022, GMT
{
timeZoneName: "shortGeneric"
}
4/24/2022, GMT
{
timeZoneName: "longGeneric"
}
4/24/2022, GMT
formatMatcher
{
formatMatcher: "best fit"
}
4/24/2022
{
formatMatcher: "basic"
}
4/24/2022
localeMatcher
{
localeMatcher: "best fit"
}
4/24/2022
{
localeMatcher: "lookup"
}
4/24/2022