mirror of
https://github.com/HangarMC/Hangar.git
synced 2025-02-17 15:01:42 +08:00
fix: specify date time format for every lang, closes #1387
This commit is contained in:
parent
017e3d2505
commit
b2047fe274
@ -1,37 +1,69 @@
|
||||
const dateTimeFormat = {
|
||||
date: {
|
||||
day: "numeric",
|
||||
month: "long",
|
||||
year: "numeric",
|
||||
},
|
||||
time: {
|
||||
day: "numeric",
|
||||
month: "2-digit",
|
||||
year: "numeric",
|
||||
hour: "numeric",
|
||||
minute: "numeric",
|
||||
},
|
||||
datetime: {
|
||||
day: "numeric",
|
||||
month: "long",
|
||||
year: "numeric",
|
||||
hour: "numeric",
|
||||
minute: "numeric",
|
||||
},
|
||||
shortweektime: {
|
||||
weekday: "short",
|
||||
hour: "numeric",
|
||||
minute: "numeric",
|
||||
},
|
||||
clock: {
|
||||
hour: "numeric",
|
||||
minute: "numeric",
|
||||
},
|
||||
} as const;
|
||||
|
||||
export default defineI18nConfig(() => ({
|
||||
legacy: false,
|
||||
locale: "en",
|
||||
fallbackLocale: "en",
|
||||
datetimeFormats: {
|
||||
en: {
|
||||
date: {
|
||||
day: "numeric",
|
||||
month: "long",
|
||||
year: "numeric",
|
||||
},
|
||||
time: {
|
||||
day: "numeric",
|
||||
month: "2-digit",
|
||||
year: "numeric",
|
||||
hour: "numeric",
|
||||
minute: "numeric",
|
||||
},
|
||||
datetime: {
|
||||
day: "numeric",
|
||||
month: "long",
|
||||
year: "numeric",
|
||||
hour: "numeric",
|
||||
minute: "numeric",
|
||||
},
|
||||
shortweektime: {
|
||||
weekday: "short",
|
||||
hour: "numeric",
|
||||
minute: "numeric",
|
||||
},
|
||||
clock: {
|
||||
hour: "numeric",
|
||||
minute: "numeric",
|
||||
},
|
||||
},
|
||||
af: dateTimeFormat,
|
||||
ar: dateTimeFormat,
|
||||
bg: dateTimeFormat,
|
||||
ca: dateTimeFormat,
|
||||
cs: dateTimeFormat,
|
||||
da: dateTimeFormat,
|
||||
de: dateTimeFormat,
|
||||
dum: dateTimeFormat,
|
||||
el: dateTimeFormat,
|
||||
en: dateTimeFormat,
|
||||
es: dateTimeFormat,
|
||||
fi: dateTimeFormat,
|
||||
fr: dateTimeFormat,
|
||||
he: dateTimeFormat,
|
||||
hu: dateTimeFormat,
|
||||
it: dateTimeFormat,
|
||||
ja: dateTimeFormat,
|
||||
ko: dateTimeFormat,
|
||||
ku: dateTimeFormat,
|
||||
nl: dateTimeFormat,
|
||||
no: dateTimeFormat,
|
||||
pl: dateTimeFormat,
|
||||
pt: dateTimeFormat,
|
||||
ro: dateTimeFormat,
|
||||
ru: dateTimeFormat,
|
||||
srcyrl: dateTimeFormat,
|
||||
sv: dateTimeFormat,
|
||||
tr: dateTimeFormat,
|
||||
uk: dateTimeFormat,
|
||||
zhS: dateTimeFormat,
|
||||
zhT: dateTimeFormat,
|
||||
},
|
||||
}));
|
||||
|
Loading…
Reference in New Issue
Block a user