DEV: Update moment.js (#18207)

Closes #18176
This commit is contained in:
Jarek Radosz
2022-09-12 10:56:39 +02:00
committed by GitHub
parent 0a49db14a4
commit 584dbb7202
5 changed files with 14 additions and 12 deletions

View File

@@ -38,7 +38,8 @@
return wordKey[2];
},
translate: function (number, withoutSuffix, key, isFuture) {
var wordKey = translator.words[key];
var wordKey = translator.words[key],
word;
if (key.length === 1) {
// Nominativ
@@ -46,7 +47,7 @@
return isFuture || withoutSuffix ? wordKey[0] : wordKey[1];
}
const word = translator.correctGrammaticalCase(number, wordKey);
word = translator.correctGrammaticalCase(number, wordKey);
// Nominativ
if (key === 'yy' && withoutSuffix && word === 'годину') {
return number + ' година';

View File

@@ -38,7 +38,8 @@
return wordKey[2];
},
translate: function (number, withoutSuffix, key, isFuture) {
var wordKey = translator.words[key];
var wordKey = translator.words[key],
word;
if (key.length === 1) {
// Nominativ
@@ -46,7 +47,7 @@
return isFuture || withoutSuffix ? wordKey[0] : wordKey[1];
}
const word = translator.correctGrammaticalCase(number, wordKey);
word = translator.correctGrammaticalCase(number, wordKey);
// Nominativ
if (key === 'yy' && withoutSuffix && word === 'godinu') {
return number + ' godina';

View File

@@ -1,5 +1,5 @@
//! moment.js
//! version : 2.29.2
//! version : 2.29.4
//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
//! license : MIT
//! momentjs.com
@@ -2454,7 +2454,7 @@
function preprocessRFC2822(s) {
// Remove comments and folding whitespace and replace multiple-spaces with a single space
return s
.replace(/\([^)]*\)|[\n\t]/g, ' ')
.replace(/\([^()]*\)|[\n\t]/g, ' ')
.replace(/(\s\s+)/g, ' ')
.replace(/^\s\s*/, '')
.replace(/\s\s*$/, '');
@@ -5635,7 +5635,7 @@
//! moment.js
hooks.version = '2.29.2';
hooks.version = '2.29.4';
setHookCallback(createLocal);