diff options
author | Luke Shumaker <lukeshu@sbcglobal.net> | 2016-05-01 15:30:02 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@sbcglobal.net> | 2016-05-01 15:30:02 -0400 |
commit | 1de335ad3f395ca6861085393ba366a9e3fb4a0d (patch) | |
tree | f1fdd326034e05177596851be6a7127615d81498 /resources/lib/moment/locale/ru.js | |
parent | 9c75fa8ff6d4d38ef552c00fef5969fb154765e8 (diff) | |
parent | f6d65e533c62f6deb21342d4901ece24497b433e (diff) |
Merge commit 'f6d65'
# Conflicts:
# skins/ArchLinux/ArchLinux.php
Diffstat (limited to 'resources/lib/moment/locale/ru.js')
-rw-r--r-- | resources/lib/moment/locale/ru.js | 40 |
1 files changed, 25 insertions, 15 deletions
diff --git a/resources/lib/moment/locale/ru.js b/resources/lib/moment/locale/ru.js index 2f15233b..5adfa9ac 100644 --- a/resources/lib/moment/locale/ru.js +++ b/resources/lib/moment/locale/ru.js @@ -9,7 +9,7 @@ } else if (typeof exports === 'object') { module.exports = factory(require('../moment')); // Node } else { - factory(window.moment); // Browser global + factory((typeof global !== 'undefined' ? global : this).moment); // node or other global } }(function (moment) { function plural(word, num) { @@ -48,7 +48,7 @@ function monthsShortCaseReplace(m, format) { var monthsShort = { - 'nominative': 'янв_фев_мар_апр_май_июнь_июль_авг_сен_окт_ноя_дек'.split('_'), + 'nominative': 'янв_фев_март_апр_май_июнь_июль_авг_сен_окт_ноя_дек'.split('_'), 'accusative': 'янв_фев_мар_апр_мая_июня_июля_авг_сен_окт_ноя_дек'.split('_') }, @@ -65,7 +65,7 @@ 'accusative': 'воскресенье_понедельник_вторник_среду_четверг_пятницу_субботу'.split('_') }, - nounCase = (/\[ ?[Вв] ?(?:прошлую|следующую)? ?\] ?dddd/).test(format) ? + nounCase = (/\[ ?[Вв] ?(?:прошлую|следующую|эту)? ?\] ?dddd/).test(format) ? 'accusative' : 'nominative'; @@ -81,6 +81,7 @@ monthsParse : [/^янв/i, /^фев/i, /^мар/i, /^апр/i, /^ма[й|я]/i, /^июн/i, /^июл/i, /^авг/i, /^сен/i, /^окт/i, /^ноя/i, /^дек/i], longDateFormat : { LT : 'HH:mm', + LTS : 'LT:ss', L : 'DD.MM.YYYY', LL : 'D MMMM YYYY г.', LLL : 'D MMMM YYYY г., LT', @@ -93,18 +94,26 @@ nextWeek: function () { return this.day() === 2 ? '[Во] dddd [в] LT' : '[В] dddd [в] LT'; }, - lastWeek: function () { - switch (this.day()) { - case 0: - return '[В прошлое] dddd [в] LT'; - case 1: - case 2: - case 4: - return '[В прошлый] dddd [в] LT'; - case 3: - case 5: - case 6: - return '[В прошлую] dddd [в] LT'; + lastWeek: function (now) { + if (now.week() !== this.week()) { + switch (this.day()) { + case 0: + return '[В прошлое] dddd [в] LT'; + case 1: + case 2: + case 4: + return '[В прошлый] dddd [в] LT'; + case 3: + case 5: + case 6: + return '[В прошлую] dddd [в] LT'; + } + } else { + if (this.day() === 2) { + return '[Во] dddd [в] LT'; + } else { + return '[В] dddd [в] LT'; + } } }, sameElse: 'L' @@ -142,6 +151,7 @@ } }, + ordinalParse: /\d{1,2}-(й|го|я)/, ordinal: function (number, period) { switch (period) { case 'M': |