Skip to content

Commit

Permalink
#131 Defined "month, weekday and weekdayNarrow" template and stored i…
Browse files Browse the repository at this point in the history
…t in "const dateTimeFormats" to be used inside the options object in the new VueI18n instance - call i18n.setDateTimeFormat() after fetching current page locale
  • Loading branch information
BeneRichi committed Jan 20, 2023
1 parent 1f3f7f1 commit 7776793
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/setup/i18n.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
},
Expand Down

0 comments on commit 7776793

Please sign in to comment.