mirror of
https://gitlab.com/PronounsPage/PronounsPage.git
synced 2025-09-26 22:43:06 -04:00
[bug] add luxon locale fallback
This commit is contained in:
parent
309fb276fe
commit
f56e90698f
@ -59,7 +59,12 @@ export default ({ app, store }) => {
|
|||||||
return promise;
|
return promise;
|
||||||
};
|
};
|
||||||
|
|
||||||
Settings.defaultLocale = config.locale;
|
try {
|
||||||
|
Settings.defaultLocale = config.locale;
|
||||||
|
DateTime.now().toFormat('y-MM-dd HH:mm'); // test if locale is supported by luxon
|
||||||
|
} catch {
|
||||||
|
Settings.defaultLocale = 'en';
|
||||||
|
}
|
||||||
|
|
||||||
Vue.prototype.$datetime = (timestamp) => {
|
Vue.prototype.$datetime = (timestamp) => {
|
||||||
const dt = DateTime.fromSeconds(timestamp);
|
const dt = DateTime.fromSeconds(timestamp);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user