From 77767934ca6cbddcece29322f6d45ae5c377286a Mon Sep 17 00:00:00 2001 From: BeneRichi Date: Fri, 20 Jan 2023 11:54:02 +0100 Subject: [PATCH] #131 Defined "month, weekday and weekdayNarrow" template and stored it in "const dateTimeFormats" to be used inside the options object in the new VueI18n instance - call i18n.setDateTimeFormat() after fetching current page locale --- src/setup/i18n.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/setup/i18n.js b/src/setup/i18n.js index ced0122e..ea956f1a 100644 --- a/src/setup/i18n.js +++ b/src/setup/i18n.js @@ -23,6 +23,12 @@ if (process.env.NODE_ENV !== 'production') { } const dateTimeFormats = { // @see https://developer.mozilla.org/de/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat#parameter + weekday: { // Monday, Tuesday, Wednesday, ... + weekday: 'long', + }, + weekdayNarrow: { // M, T, W, ... + weekday: 'narrow', + }, month: { // January, February, March, ... month: 'long', },