Skip to content
This repository was archived by the owner on Oct 17, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions live-examples/js-examples/intl/intl-locale.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<pre>
<code id="static-js">const korean = new Intl.Locale('ko', {
script: 'Kore', region: 'KR', hourCycle: 'h24', calendar: 'gregory'
});

const japanese = new Intl.Locale('ja-Jpan-JP-u-ca-japanese-hc-h12');

console.log(korean.baseName, japanese.baseName);
// expected output: "ko-Kore-KR" "ja-Jpan-JP"

console.log(korean.hourCycle, japanese.hourCycle);
// expected output: "h24" "h12"</code>
</pre>
8 changes: 7 additions & 1 deletion live-examples/js-examples/intl/meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,12 @@
"title": "JavaScript Demo: Intl.ListFormat",
"type": "js"
},
"intlLocale": {
"exampleCode": "./live-examples/js-examples/intl/intl-locale.html",
"fileName": "intl-locale.html",
"title": "JavaScript Demo: Intl.Locale",
"type": "js"
},
"intlLocalePrototypeMaximize": {
"exampleCode": "./live-examples/js-examples/intl/intl-locale-prototype-maximize.html",
"fileName": "intl-locale-prototype-maximize.html",
Expand All @@ -77,7 +83,7 @@
"fileName": "intl-locale-prototype-tostring.html",
"title": "JavaScript Demo: Intl.Locale.prototype.toString()",
"type": "js"
},
},
"intlNumberFormatPrototypeFormat": {
"exampleCode": "./live-examples/js-examples/intl/intl-numberformat-prototype-format.html",
"fileName": "intl-numberformat-prototype-format.html",
Expand Down