"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "locale/sr.js" between
moment-2.29.2.tar.gz and moment-2.29.3.tar.gz

About: Moment.js is a JavaScript date library for parsing, validating, manipulating, and formatting dates.

sr.js  (moment-2.29.2):sr.js  (moment-2.29.3)
skipping to change at line 41 skipping to change at line 41
if ( if (
number % 10 >= 1 && number % 10 >= 1 &&
number % 10 <= 4 && number % 10 <= 4 &&
(number % 100 < 10 || number % 100 >= 20) (number % 100 < 10 || number % 100 >= 20)
) { ) {
return number % 10 === 1 ? wordKey[0] : wordKey[1]; return number % 10 === 1 ? wordKey[0] : wordKey[1];
} }
return wordKey[2]; return wordKey[2];
}, },
translate: function (number, withoutSuffix, key, isFuture) { translate: function (number, withoutSuffix, key, isFuture) {
var wordKey = translator.words[key]; var wordKey = translator.words[key],
word;
if (key.length === 1) { if (key.length === 1) {
// Nominativ // Nominativ
if (key === 'y' && withoutSuffix) return 'jedna godina'; if (key === 'y' && withoutSuffix) return 'jedna godina';
return isFuture || withoutSuffix ? wordKey[0] : wordKey[1]; return isFuture || withoutSuffix ? wordKey[0] : wordKey[1];
} }
const word = translator.correctGrammaticalCase(number, wordKey); word = translator.correctGrammaticalCase(number, wordKey);
// Nominativ // Nominativ
if (key === 'yy' && withoutSuffix && word === 'godinu') { if (key === 'yy' && withoutSuffix && word === 'godinu') {
return number + ' godina'; return number + ' godina';
} }
return number + ' ' + word; return number + ' ' + word;
}, },
}; };
var sr = moment.defineLocale('sr', { var sr = moment.defineLocale('sr', {
 End of changes. 2 change blocks. 
2 lines changed or deleted 3 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)