Settings

Code Theme

Theme for code blocks: OceanicNext/Github

Theme

Page theme

Toggle to hide or show Browser Details/Support

Change the color of the accent (default: purple)

Language for page. Press Confirm to reload page with selected language

Confirm language

Intl.DateTimeFormat

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


zh-CN

Alternativ use

Intl.DateTimeFormat can also be used from Date.prototype.toLocaleString()
new Date("2022-04-24T19:00")
		.toLocaleString("zh-CN")
2022/4/24 19:00:00

Output


dateStyle

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"
}
2022年4月24日星期日
{
dateStyle: "long"
}
2022年4月24日
{
dateStyle: "medium"
}
2022年4月24日
{
dateStyle: "short"
}
2022/4/24

timeStyle

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"
}
协调世界时 19:00:00
{
timeStyle: "long"
}
UTC 19:00:00
{
timeStyle: "medium"
}
19:00:00
{
timeStyle: "short"
}
19:00

year

{
year: "numeric"
}
2022年
{
year: "2-digit"
}
22年

month

{
month: "numeric"
}
4月
{
month: "2-digit"
}
04月
{
month: "long"
}
四月
{
month: "short"
}
4月
{
month: "narrow"
}
4

day

{
day: "numeric"
}
24日
{
day: "2-digit"
}
24日

hour

{
hour: "numeric"
}
19时
{
hour: "2-digit"
}
19时

minute

{
minute: "numeric"
}
0
{
minute: "2-digit"
}
0

second

{
second: "numeric"
}
0
{
second: "2-digit"
}
0

weekday

{
weekday: "long"
}
星期日
{
weekday: "short"
}
周日
{
weekday: "narrow"
}

era

{
era: "long"
}
公元 2022-04-24
{
era: "short"
}
公元 2022-04-24
{
era: "narrow"
}
公元 2022-04-24

hour12

{
hour12: true
}
下午07:00:00
{
hour12: false
}
19:00:00

hourCycle

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"
}
下午07:00:00
{
hourCycle: "h12"
}
下午07:00:00
{
hourCycle: "h23"
}
19:00:00
{
hourCycle: "h24"
}
19:00:00

dayPeriod

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"
}
晚上
{
dayPeriod: "short"
}
晚上
{
dayPeriod: "narrow"
}
晚上

fractionalSecondDigits

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

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"
}
佛历2565-4-24
{
calendar: "chinese"
}
2022年三月24
{
calendar: "coptic"
}
科普特历 1738/8/16
{
calendar: "ethiopia"
}
2022/4/24
{
calendar: "ethiopic"
}
埃历 2014/8/16
{
calendar: "gregory"
}
2022/4/24
{
calendar: "hebrew"
}
希伯来历 5782/8/23
{
calendar: "indian"
}
印度历 1944/2/4
{
calendar: "islamic"
}
伊斯兰历 1443/9/23
{
calendar: "iso8601"
}
2022/4/24
{
calendar: "japanese"
}
令和4-04-24
{
calendar: "persian"
}
波斯历 1401/2/4
{
calendar: "roc"
}
民国111/4/24

numberingSystem

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"
}
2022/4/24
{
numberingSystem: "gujr"
}
૨૦૨૨/૪/૨૪
{
numberingSystem: "guru"
}
੨੦੨੨/੪/੨੪
{
numberingSystem: "hanidec"
}
二〇二二/四/二四
{
numberingSystem: "khmr"
}
២០២២/៤/២៤
{
numberingSystem: "knda"
}
೨೦೨೨/೪/೨೪
{
numberingSystem: "laoo"
}
໒໐໒໒/໔/໒໔
{
numberingSystem: "latn"
}
2022/4/24
{
numberingSystem: "limb"
}
᥈᥆᥈᥈/᥊/᥈᥊
{
numberingSystem: "mlym"
}
൨൦൨൨/൪/൨൪
{
numberingSystem: "mong"
}
᠒᠐᠒᠒/᠔/᠒᠔
{
numberingSystem: "mymr"
}
၂၀၂၂/၄/၂၄
{
numberingSystem: "orya"
}
୨୦୨୨/୪/୨୪
{
numberingSystem: "tamldec"
}
௨௦௨௨/௪/௨௪
{
numberingSystem: "telu"
}
౨౦౨౨/౪/౨౪
{
numberingSystem: "thai"
}
๒๐๒๒/๔/๒๔
{
numberingSystem: "tibt"
}
༢༠༢༢/༤/༢༤

timeZoneName

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"
}
2022/4/24 协调世界时
{
timeZoneName: "short"
}
2022/4/24 UTC
{
timeZoneName: "shortOffset"
}
2022/4/24 GMT
{
timeZoneName: "longOffset"
}
2022/4/24 GMT
{
timeZoneName: "shortGeneric"
}
2022/4/24 GMT
{
timeZoneName: "longGeneric"
}
2022/4/24 GMT

formatMatcher

{
formatMatcher: "best fit"
}
2022/4/24
{
formatMatcher: "basic"
}
2022/4/24

localeMatcher

{
localeMatcher: "best fit"
}
2022/4/24
{
localeMatcher: "lookup"
}
2022/4/24