summaryrefslogtreecommitdiff
path: root/packages/frontend/src/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/frontend/src/scripts')
-rw-r--r--packages/frontend/src/scripts/intl-const.ts12
1 files changed, 12 insertions, 0 deletions
diff --git a/packages/frontend/src/scripts/intl-const.ts b/packages/frontend/src/scripts/intl-const.ts
new file mode 100644
index 0000000000..081ff6248c
--- /dev/null
+++ b/packages/frontend/src/scripts/intl-const.ts
@@ -0,0 +1,12 @@
+import { lang } from '@/config';
+
+export const versatileLang = (lang ?? 'ja-JP').replace('ja-KS', 'ja-JP');
+export const dateTimeFormat = new Intl.DateTimeFormat(versatileLang, {
+ year: 'numeric',
+ month: 'numeric',
+ day: 'numeric',
+ hour: 'numeric',
+ minute: 'numeric',
+ second: 'numeric',
+});
+export const numberFormat = new Intl.NumberFormat(versatileLang);