Fix: remove dot from MMM key lookup in formatDateTime
This commit is contained in:
1 parent
66cc6d1939
commit
8b5420c274
1 file changed
+1
-2
+1
-2
@@ -819,7 +819,6 @@ var effect = (VANTA.CLOUDS2 || VANTA.CLOUDS)({
|
|||||||
function pad3(n) { return n < 10 ? '00' + n : n < 100 ? '0' + n : '' + n; }
|
function pad3(n) { return n < 10 ? '00' + n : n < 100 ? '0' + n : '' + n; }
|
||||||
|
|
||||||
function formatDateTime(format, date) {
|
function formatDateTime(format, date) {
|
||||||
console.log('formatDateTime called', format, 'lang=', window.CONFIG && window.CONFIG.language);
|
|
||||||
// Strict ISO 8601 format tokens (case-sensitive):
|
// Strict ISO 8601 format tokens (case-sensitive):
|
||||||
// YYYY 4-digit year (2026)
|
// YYYY 4-digit year (2026)
|
||||||
// MM month 01-12 (10) -- always month, never minute
|
// MM month 01-12 (10) -- always month, never minute
|
||||||
@@ -871,7 +870,7 @@ var effect = (VANTA.CLOUDS2 || VANTA.CLOUDS)({
|
|||||||
result += tMonthFull;
|
result += tMonthFull;
|
||||||
i += 4;
|
i += 4;
|
||||||
} else if (ch === 'M' && format.substr(i, 3) === 'MMM') {
|
} else if (ch === 'M' && format.substr(i, 3) === 'MMM') {
|
||||||
result += t(monthKeys[date.getMonth()].substring(0, 3) + '.');
|
result += t(monthKeys[date.getMonth()].substring(0, 3));
|
||||||
i += 3;
|
i += 3;
|
||||||
} else if (ch === 'M' && format.substr(i, 2) === 'MM') {
|
} else if (ch === 'M' && format.substr(i, 2) === 'MM') {
|
||||||
result += pad2(date.getMonth() + 1);
|
result += pad2(date.getMonth() + 1);
|
||||||
|
|||||||
Reference in new issue
Block a user