vendor: 6,063 bytes, lines 1-159
1// moment.js locale configuration 2// locale : ukrainian (uk) 3// author : zemlanin : https://github.com/zemlanin 4// Author : Menelion Elensúle : https://github.com/Oire 5 6(function (factory) { 7 if (typeof define === 'function' && define.amd) { 8 define(['moment'], factory); // AMD 9 } else if (typeof exports === 'object') { 10 module.exports = factory(require('../moment')); // Node 11 } else { 12 factory((typeof global !== 'undefined' ? global : this).moment); // node or other global 13 } 14}(function (moment) { 15 function plural(word, num) { 16 var forms = word.split('_'); 17 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]); 18 } 19 20 function relativeTimeWithPlural(number, withoutSuffix, key) { 21 var format = { 22 'mm': 'Ñ Ð²Ð¸Ð»Ð¸Ð½Ð°_Ñ Ð²Ð¸Ð»Ð¸Ð½Ð¸_Ñ Ð²Ð¸Ð»Ð¸Ð½', 23 'hh': 'година_години_годин', 24 'dd': 'денÑ_днÑ_днÑв', 25 'MM': 'мÑÑÑÑÑ_мÑÑÑÑÑ_мÑÑÑÑÑв', 26 'yy': 'ÑÑк_Ñоки_ÑокÑв' 27 }; 28 if (key === 'm') { 29 return withoutSuffix ? 'Ñ Ð²Ð¸Ð»Ð¸Ð½Ð°' : 'Ñ Ð²Ð¸Ð»Ð¸Ð½Ñ'; 30 } 31 else if (key === 'h') { 32 return withoutSuffix ? 'година' : 'годинÑ'; 33 } 34 else { 35 return number + ' ' + plural(format[key], +number); 36 } 37 } 38 39 function monthsCaseReplace(m, format) { 40 var months = { 41 'nominative': 'ÑÑÑенÑ_лÑÑий_беÑезенÑ_квÑÑенÑ_ÑÑавенÑ_ÑеÑвенÑ_липенÑ_ÑеÑпенÑ_веÑеÑенÑ_жовÑенÑ_лиÑÑопад_гÑÑденÑ'.split('_'), 42 'accusative': 'ÑÑÑнÑ_лÑÑого_беÑезнÑ_квÑÑнÑ_ÑÑавнÑ_ÑеÑвнÑ_липнÑ_ÑеÑпнÑ_веÑеÑнÑ_жовÑнÑ_лиÑÑопада_гÑÑднÑ'.split('_') 43 }, 44 45 nounCase = (/D[oD]? *MMMM?/).test(format) ? 46 'accusative' : 47 'nominative'; 48 49 return months[nounCase][m.month()]; 50 } 51 52 function weekdaysCaseReplace(m, format) { 53 var weekdays = { 54 'nominative': 'недÑлÑ_понедÑлок_вÑвÑоÑок_ÑеÑеда_ÑеÑвеÑ_пâÑÑниÑÑ_ÑÑбоÑа'.split('_'), 55 'accusative': 'недÑлÑ_понедÑлок_вÑвÑоÑок_ÑеÑедÑ_ÑеÑвеÑ_пâÑÑниÑÑ_ÑÑбоÑÑ'.split('_'), 56 'genitive': 'недÑлÑ_понедÑлка_вÑвÑоÑка_ÑеÑеди_ÑеÑвеÑга_пâÑÑниÑÑ_ÑÑбоÑи'.split('_') 57 }, 58 59 nounCase = (/(\[[ÐвУÑ]\]) ?dddd/).test(format) ? 60 'accusative' : 61 ((/\[?(?:минÑлоÑ|наÑÑÑпноÑ)? ?\] ?dddd/).test(format) ? 62 'genitive' : 63 'nominative'); 64 65 return weekdays[nounCase][m.day()]; 66 } 67 68 function processHoursFunction(str) { 69 return function () { 70 return str + 'о' + (this.hours() === 11 ? 'б' : '') + '] LT'; 71 }; 72 } 73 74 return moment.defineLocale('uk', { 75 months : monthsCaseReplace, 76 monthsShort : 'ÑÑÑ_лÑÑ_беÑ_квÑÑ_ÑÑав_ÑеÑв_лип_ÑеÑп_веÑ_жовÑ_лиÑÑ_гÑÑд'.split('_'), 77 weekdays : weekdaysCaseReplace, 78 weekdaysShort : 'нд_пн_вÑ_ÑÑ_ÑÑ_пÑ_Ñб'.split('_'), 79 weekdaysMin : 'нд_пн_вÑ_ÑÑ_ÑÑ_пÑ_Ñб'.split('_'), 80 longDateFormat : { 81 LT : 'HH:mm', 82 LTS : 'LT:ss', 83 L : 'DD.MM.YYYY', 84 LL : 'D MMMM YYYY Ñ.', 85 LLL : 'D MMMM YYYY Ñ., LT', 86 LLLL : 'dddd, D MMMM YYYY Ñ., LT' 87 }, 88 calendar : { 89 sameDay: processHoursFunction('[СÑÐ¾Ð³Ð¾Ð´Ð½Ñ '), 90 nextDay: processHoursFunction('[ÐавÑÑа '), 91 lastDay: processHoursFunction('[ÐÑоÑа '), 92 nextWeek: processHoursFunction('[У] dddd ['), 93 lastWeek: function () { 94 switch (this.day()) { 95 case 0: 96 case 3: 97 case 5: 98 case 6: 99 return processHoursFunction('[ÐинÑлоÑ] dddd [').call(this); 100 case 1: 101 case 2: 102 case 4: 103 return processHoursFunction('[ÐинÑлого] dddd [').call(this); 104 } 105 }, 106 sameElse: 'L' 107 }, 108 relativeTime : { 109 future : 'за %s', 110 past : '%s ÑомÑ', 111 s : 'декÑлÑка ÑекÑнд', 112 m : relativeTimeWithPlural, 113 mm : relativeTimeWithPlural, 114 h : 'годинÑ', 115 hh : relativeTimeWithPlural, 116 d : 'денÑ', 117 dd : relativeTimeWithPlural, 118 M : 'мÑÑÑÑÑ', 119 MM : relativeTimeWithPlural, 120 y : 'ÑÑк', 121 yy : relativeTimeWithPlural 122 }, 123 124 // M. E.: those two are virtually unused but a user might want to implement them for his/her website for some reason 125 126 meridiem : function (hour, minute, isLower) { 127 if (hour < 4) { 128 return 'ноÑÑ'; 129 } else if (hour < 12) { 130 return 'ÑанкÑ'; 131 } else if (hour < 17) { 132 return 'днÑ'; 133 } else { 134 return 'веÑоÑа'; 135 } 136 }, 137 138 ordinalParse: /\d{1,2}-(й|го)/, 139 ordinal: function (number, period) { 140 switch (period) { 141 case 'M': 142 case 'd': 143 case 'DDD': 144 case 'w': 145 case 'W': 146 return number + '-й'; 147 case 'D': 148 return number + '-го'; 149 default: 150 return number; 151 } 152 }, 153 154 week : { 155 dow : 1, // Monday is the first day of the week. 156 doy : 7 // The week that contains Jan 1st is the first week of the year. 157 } 158 }); 159}));
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.