Debian Codegraph @

vendor/static/moment/src/locale/ku-kmr.js

raw
1 //! moment.js locale configuration
2 //! locale : Northern Kurdish [ku-kmr]
3 //! authors : Mazlum Özdogan : https://github.com/mergehez
4
5 // All rules except for month names are according to
6 // the spelling rules which are defined in the book 'Rêbera Rastnivîsînê' from Komxebata Kurmancîyê.
7 // Komxebata Kurmancîyê is a work group that studied different uses in Kurdish language (Kurmanji/Northern Kurdish),
8 // chose one of alternatives as standard and publish them via their book.
9 // There are 18 Kurdish linguists in the group.
10 // The group was formed by Mesopotamia Foundation
11
12 import moment from '../moment';
13
14 function processRelativeTime(num, withoutSuffix, key, isFuture) {
15 var format = {
16 s: ['çend sanîye', 'çend sanîyeyan'],
17 ss: [num + ' sanîye', num + ' sanîyeyan'],
18 m: ['deqîqeyek', 'deqîqeyekê'],
19 mm: [num + ' deqîqe', num + ' deqîqeyan'],
20 h: ['saetek', 'saetekê'],
21 hh: [num + ' saet', num + ' saetan'],
22 d: ['rojek', 'rojekê'],
23 dd: [num + ' roj', num + ' rojan'],
24 w: ['hefteyek', 'hefteyekê'],
25 ww: [num + ' hefte', num + ' hefteyan'],
26 M: ['mehek', 'mehekê'],
27 MM: [num + ' meh', num + ' mehan'],
28 y: ['salek', 'salekê'],
29 yy: [num + ' sal', num + ' salan'],
30 };
31 return withoutSuffix ? format[key][0] : format[key][1];
32 }
33 // function obliqueNumSuffix(num) {
34 // if(num.includes(':'))
35 // num = parseInt(num.split(':')[0]);
36 // else
37 // num = parseInt(num);
38 // return num == 0 || num % 10 == 1 ? 'ê'
39 // : (num > 10 && num % 10 == 0 ? 'î' : 'an');
40 // }
41 function ezafeNumSuffix(num) {
42 num = '' + num;
43 var l = num.substring(num.length - 1),
44 ll = num.length > 1 ? num.substring(num.length - 2) : '';
45 if (
46 !(ll == 12 || ll == 13) &&
47 (l == '2' || l == '3' || ll == '50' || l == '70' || l == '80')
48 )
49 return 'yê';
50 return 'ê';
51 }
52
53 export default moment.defineLocale('ku-kmr', {
54 // According to the spelling rules defined by the work group of Weqfa Mezopotamyayê (Mesopotamia Foundation)
55 // this should be: 'Kanûna Paşîn_Sibat_Adar_Nîsan_Gulan_Hezîran_Tîrmeh_Tebax_Îlon_Çirîya Pêşîn_Çirîya Paşîn_Kanûna Pêşîn'
56 // But the names below are more well known and handy
57 months: 'Rêbendan_Sibat_Adar_Nîsan_Gulan_Hezîran_Tîrmeh_Tebax_Îlon_Cotmeh_Mijdar_Berfanbar'.split(
58 '_'
59 ),
60 monthsShort: 'Rêb_Sib_Ada_Nîs_Gul_Hez_Tîr_Teb_Îlo_Cot_Mij_Ber'.split('_'),
61 monthsParseExact: true,
62 weekdays: 'Yekşem_Duşem_Sêşem_Çarşem_Pêncşem_În_Şemî'.split('_'),
63 weekdaysShort: 'Yek_Du_Sê_Çar_Pên_În_Şem'.split('_'),
64 weekdaysMin: 'Ye_Du_Sê_Ça_Pê_În_Şe'.split('_'),
65 meridiem: function (hours, minutes, isLower) {
66 if (hours < 12) {
67 return isLower ? 'bn' : 'BN';
68 } else {
69 return isLower ? 'pn' : 'PN';
70 }
71 },
72 meridiemParse: /bn|BN|pn|PN/,
73 longDateFormat: {
74 LT: 'HH:mm',
75 LTS: 'HH:mm:ss',
76 L: 'DD.MM.YYYY',
77 LL: 'Do MMMM[a] YYYY[an]',
78 LLL: 'Do MMMM[a] YYYY[an] HH:mm',
79 LLLL: 'dddd, Do MMMM[a] YYYY[an] HH:mm',
80 ll: 'Do MMM[.] YYYY[an]',
81 lll: 'Do MMM[.] YYYY[an] HH:mm',
82 llll: 'ddd[.], Do MMM[.] YYYY[an] HH:mm',
83 },
84 calendar: {
85 sameDay: '[Îro di saet] LT [de]',
86 nextDay: '[Sibê di saet] LT [de]',
87 nextWeek: 'dddd [di saet] LT [de]',
88 lastDay: '[Duh di saet] LT [de]',
89 lastWeek: 'dddd[a borî di saet] LT [de]',
90 sameElse: 'L',
91 },
92 relativeTime: {
93 future: 'di %s de',
94 past: 'berî %s',
95 s: processRelativeTime,
96 ss: processRelativeTime,
97 m: processRelativeTime,
98 mm: processRelativeTime,
99 h: processRelativeTime,
100 hh: processRelativeTime,
101 d: processRelativeTime,
102 dd: processRelativeTime,
103 w: processRelativeTime,
104 ww: processRelativeTime,
105 M: processRelativeTime,
106 MM: processRelativeTime,
107 y: processRelativeTime,
108 yy: processRelativeTime,
109 },
110 dayOfMonthOrdinalParse: /\d{1,2}(?:yê|ê|\.)/,
111 ordinal: function (num, period) {
112 var p = period.toLowerCase();
113 if (p.includes('w') || p.includes('m')) return num + '.';
114
115 return num + ezafeNumSuffix(num);
116 },
117 week: {
118 dow: 1, // Monday is the first day of the week.
119 doy: 4, // The week that contains Jan 4th is the first week of the year.
120 },
121 });