1//! moment.js locale configuration 2//! locale : russian (ru) 3//! author : Viktorminator : https://github.com/Viktorminator 4//! Author : Menelion Elensúle : https://github.com/Oire 5 6(function (global, factory) { 7 typeof exports === 'object' && typeof module !== 'undefined' ? factory(require('../moment')) : 8 typeof define === 'function' && define.amd ? define(['moment'], factory) : 9 factory(global.moment) 10}(this, function (moment) { 'use strict'; 11 12 13 function plural(word, num) { 14 var forms = word.split('_'); 15 return num % 10 === 1 && num % 100 !== 11 ? forms[0] : (num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20) ? forms[1] : forms[2]); 16 } 17 function relativeTimeWithPlural(number, withoutSuffix, key) { 18 var format = { 19 'mm': withoutSuffix ? 'минÑÑа_минÑÑÑ_минÑÑ' : 'минÑÑÑ_минÑÑÑ_минÑÑ', 20 'hh': 'ÑаÑ_ÑаÑа_ÑаÑов', 21 'dd': 'денÑ_днÑ_дней', 22 'MM': 'меÑÑÑ_меÑÑÑа_меÑÑÑев', 23 'yy': 'год_года_леÑ' 24 }; 25 if (key === 'm') { 26 return withoutSuffix ? 'минÑÑа' : 'минÑÑÑ'; 27 } 28 else { 29 return number + ' ' + plural(format[key], +number); 30 } 31 } 32 function monthsCaseReplace(m, format) { 33 var months = { 34 'nominative': 'ÑнваÑÑ_ÑевÑалÑ_маÑÑ_апÑелÑ_май_иÑнÑ_иÑлÑ_авгÑÑÑ_ÑенÑÑбÑÑ_окÑÑбÑÑ_ноÑбÑÑ_декабÑÑ'.split('_'), 35 'accusative': 'ÑнваÑÑ_ÑевÑалÑ_маÑÑа_апÑелÑ_маÑ_иÑнÑ_иÑлÑ_авгÑÑÑа_ÑенÑÑбÑÑ_окÑÑбÑÑ_ноÑбÑÑ_декабÑÑ'.split('_') 36 }, 37 nounCase = (/D[oD]?(\[[^\[\]]*\]|\s+)+MMMM?/).test(format) ? 38 'accusative' : 39 'nominative'; 40 return months[nounCase][m.month()]; 41 } 42 function monthsShortCaseReplace(m, format) { 43 var monthsShort = { 44 'nominative': 'Ñнв_Ñев_маÑÑ_апÑ_май_иÑнÑ_иÑлÑ_авг_Ñен_окÑ_ноÑ_дек'.split('_'), 45 'accusative': 'Ñнв_Ñев_маÑ_апÑ_маÑ_иÑнÑ_иÑлÑ_авг_Ñен_окÑ_ноÑ_дек'.split('_') 46 }, 47 nounCase = (/D[oD]?(\[[^\[\]]*\]|\s+)+MMMM?/).test(format) ? 48 'accusative' : 49 'nominative'; 50 return monthsShort[nounCase][m.month()]; 51 } 52 function weekdaysCaseReplace(m, format) { 53 var weekdays = { 54 'nominative': 'воÑкÑеÑенÑе_понеделÑник_вÑоÑник_ÑÑеда_ÑеÑвеÑг_пÑÑниÑа_ÑÑббоÑа'.split('_'), 55 'accusative': 'воÑкÑеÑенÑе_понеделÑник_вÑоÑник_ÑÑедÑ_ÑеÑвеÑг_пÑÑниÑÑ_ÑÑббоÑÑ'.split('_') 56 }, 57 nounCase = (/\[ ?[Ðв] ?(?:пÑоÑлÑÑ|ÑледÑÑÑÑÑ|ÑÑÑ)? ?\] ?dddd/).test(format) ? 58 'accusative' : 59 'nominative'; 60 return weekdays[nounCase][m.day()]; 61 } 62 63 var ru = moment.defineLocale('ru', { 64 months : monthsCaseReplace, 65 monthsShort : monthsShortCaseReplace, 66 weekdays : weekdaysCaseReplace, 67 weekdaysShort : 'вÑ_пн_вÑ_ÑÑ_ÑÑ_пÑ_Ñб'.split('_'), 68 weekdaysMin : 'вÑ_пн_вÑ_ÑÑ_ÑÑ_пÑ_Ñб'.split('_'), 69 monthsParse : [/^Ñнв/i, /^Ñев/i, /^маÑ/i, /^апÑ/i, /^ма[й|Ñ]/i, /^иÑн/i, /^иÑл/i, /^авг/i, /^Ñен/i, /^окÑ/i, /^ноÑ/i, /^дек/i], 70 longDateFormat : { 71 LT : 'HH:mm', 72 LTS : 'HH:mm:ss', 73 L : 'DD.MM.YYYY', 74 LL : 'D MMMM YYYY г.', 75 LLL : 'D MMMM YYYY г., HH:mm', 76 LLLL : 'dddd, D MMMM YYYY г., HH:mm' 77 }, 78 calendar : { 79 sameDay: '[Ð¡ÐµÐ³Ð¾Ð´Ð½Ñ Ð²] LT', 80 nextDay: '[ÐавÑÑа в] LT', 81 lastDay: '[ÐÑеÑа в] LT', 82 nextWeek: function () { 83 return this.day() === 2 ? '[Ðо] dddd [в] LT' : '[Ð] dddd [в] LT'; 84 }, 85 lastWeek: function (now) { 86 if (now.week() !== this.week()) { 87 switch (this.day()) { 88 case 0: 89 return '[РпÑоÑлое] dddd [в] LT'; 90 case 1: 91 case 2: 92 case 4: 93 return '[РпÑоÑлÑй] dddd [в] LT'; 94 case 3: 95 case 5: 96 case 6: 97 return '[РпÑоÑлÑÑ] dddd [в] LT'; 98 } 99 } else { 100 if (this.day() === 2) { 101 return '[Ðо] dddd [в] LT'; 102 } else { 103 return '[Ð] dddd [в] LT'; 104 } 105 } 106 }, 107 sameElse: 'L' 108 }, 109 relativeTime : { 110 future : 'ÑеÑез %s', 111 past : '%s назад', 112 s : 'неÑколÑко ÑекÑнд', 113 m : relativeTimeWithPlural, 114 mm : relativeTimeWithPlural, 115 h : 'ÑаÑ', 116 hh : relativeTimeWithPlural, 117 d : 'денÑ', 118 dd : relativeTimeWithPlural, 119 M : 'меÑÑÑ', 120 MM : relativeTimeWithPlural, 121 y : 'год', 122 yy : relativeTimeWithPlural 123 }, 124 meridiemParse: /ноÑи|ÑÑÑа|днÑ|веÑеÑа/i, 125 isPM : function (input) { 126 return /^(днÑ|веÑеÑа)$/.test(input); 127 }, 128 meridiem : function (hour, minute, isLower) { 129 if (hour < 4) { 130 return 'ноÑи'; 131 } else if (hour < 12) { 132 return 'ÑÑÑа'; 133 } else if (hour < 17) { 134 return 'днÑ'; 135 } else { 136 return 'веÑеÑа'; 137 } 138 }, 139 ordinalParse: /\d{1,2}-(й|го|Ñ)/, 140 ordinal: function (number, period) { 141 switch (period) { 142 case 'M': 143 case 'd': 144 case 'DDD': 145 return number + '-й'; 146 case 'D': 147 return number + '-го'; 148 case 'w': 149 case 'W': 150 return number + '-Ñ'; 151 default: 152 return number; 153 } 154 }, 155 week : { 156 dow : 1, // Monday is the first day of the week. 157 doy : 7 // The week that contains Jan 1st is the first week of the year. 158 } 159 }); 160 161 return ru; 162 163}));
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.