mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-28 19:49:20 +03:00
Bugfix: momentjs shortMonths can be array or function
This commit is contained in:
parent
b1678a1566
commit
6d29acb7eb
2 changed files with 12 additions and 7 deletions
9
dev/prototype-date.js
vendored
9
dev/prototype-date.js
vendored
|
|
@ -5,10 +5,15 @@
|
|||
w.moment = {
|
||||
defineLocale: (name, config)=>{
|
||||
locale = config;
|
||||
for (let i = 0; i < 12; ++i) Date.shortMonths[i] = config.monthsShort(i+1, 'MMM');
|
||||
const m = config.monthsShort;
|
||||
if (Array.isArray(m)) {
|
||||
Date.shortMonths = m;
|
||||
} else for (let i = 0; i < 12; ++i) {
|
||||
Date.shortMonths[i] = config.monthsShort({month:()=>i}, '-MMM-');
|
||||
}
|
||||
Date.longMonths = config.months,
|
||||
Date.longDays = config.weekdays;
|
||||
Date.shortDays = config.weekdaysMin; // config.weekdaysShort
|
||||
Date.shortDays = config.weekdaysMin;
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue