Merge "Don't fallback from uk to ru"
[lhc/web/wiklou.git] / resources / lib / moment / locale / bo.js
1 // moment.js locale configuration
2 // locale : tibetan (bo)
3 // author : Thupten N. Chakrishar : https://github.com/vajradog
4
5 (function (factory) {
6 // Comment out broken wrapper, see T145382
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 factory(this.moment);
15 }(function (moment) {
16 var symbolMap = {
17 '1': '༡',
18 '2': '༢',
19 '3': '༣',
20 '4': '༤',
21 '5': '༥',
22 '6': '༦',
23 '7': '༧',
24 '8': '༨',
25 '9': '༩',
26 '0': '༠'
27 },
28 numberMap = {
29 '༡': '1',
30 '༢': '2',
31 '༣': '3',
32 '༤': '4',
33 '༥': '5',
34 '༦': '6',
35 '༧': '7',
36 '༨': '8',
37 '༩': '9',
38 '༠': '0'
39 };
40
41 return moment.defineLocale('bo', {
42 months : 'ཟླ་བ་དང་པོ_ཟླ་བ་གཉིས་པ_ཟླ་བ་གསུམ་པ_ཟླ་བ་བཞི་པ_ཟླ་བ་ལྔ་པ_ཟླ་བ་དྲུག་པ_ཟླ་བ་བདུན་པ_ཟླ་བ་བརྒྱད་པ_ཟླ་བ་དགུ་པ_ཟླ་བ་བཅུ་པ_ཟླ་བ་བཅུ་གཅིག་པ_ཟླ་བ་བཅུ་གཉིས་པ'.split('_'),
43 monthsShort : 'ཟླ་བ་དང་པོ_ཟླ་བ་གཉིས་པ_ཟླ་བ་གསུམ་པ_ཟླ་བ་བཞི་པ_ཟླ་བ་ལྔ་པ_ཟླ་བ་དྲུག་པ_ཟླ་བ་བདུན་པ_ཟླ་བ་བརྒྱད་པ_ཟླ་བ་དགུ་པ_ཟླ་བ་བཅུ་པ_ཟླ་བ་བཅུ་གཅིག་པ_ཟླ་བ་བཅུ་གཉིས་པ'.split('_'),
44 weekdays : 'གཟའ་ཉི་མ་_གཟའ་ཟླ་བ་_གཟའ་མིག་དམར་_གཟའ་ལྷག་པ་_གཟའ་ཕུར་བུ_གཟའ་པ་སངས་_གཟའ་སྤེན་པ་'.split('_'),
45 weekdaysShort : 'ཉི་མ་_ཟླ་བ་_མིག་དམར་_ལྷག་པ་_ཕུར་བུ_པ་སངས་_སྤེན་པ་'.split('_'),
46 weekdaysMin : 'ཉི་མ་_ཟླ་བ་_མིག་དམར་_ལྷག་པ་_ཕུར་བུ_པ་སངས་_སྤེན་པ་'.split('_'),
47 longDateFormat : {
48 LT : 'A h:mm',
49 LTS : 'LT:ss',
50 L : 'DD/MM/YYYY',
51 LL : 'D MMMM YYYY',
52 LLL : 'D MMMM YYYY, LT',
53 LLLL : 'dddd, D MMMM YYYY, LT'
54 },
55 calendar : {
56 sameDay : '[དི་རིང] LT',
57 nextDay : '[སང་ཉིན] LT',
58 nextWeek : '[བདུན་ཕྲག་རྗེས་མ], LT',
59 lastDay : '[ཁ་སང] LT',
60 lastWeek : '[བདུན་ཕྲག་མཐའ་མ] dddd, LT',
61 sameElse : 'L'
62 },
63 relativeTime : {
64 future : '%s ལ་',
65 past : '%s སྔན་ལ',
66 s : 'ལམ་སང',
67 m : 'སྐར་མ་གཅིག',
68 mm : '%d སྐར་མ',
69 h : 'ཆུ་ཚོད་གཅིག',
70 hh : '%d ཆུ་ཚོད',
71 d : 'ཉིན་གཅིག',
72 dd : '%d ཉིན་',
73 M : 'ཟླ་བ་གཅིག',
74 MM : '%d ཟླ་བ',
75 y : 'ལོ་གཅིག',
76 yy : '%d ལོ'
77 },
78 preparse: function (string) {
79 return string.replace(/[༡༢༣༤༥༦༧༨༩༠]/g, function (match) {
80 return numberMap[match];
81 });
82 },
83 postformat: function (string) {
84 return string.replace(/\d/g, function (match) {
85 return symbolMap[match];
86 });
87 },
88 meridiem : function (hour, minute, isLower) {
89 if (hour < 4) {
90 return 'མཚན་མོ';
91 } else if (hour < 10) {
92 return 'ཞོགས་ཀས';
93 } else if (hour < 17) {
94 return 'ཉིན་གུང';
95 } else if (hour < 20) {
96 return 'དགོང་དག';
97 } else {
98 return 'མཚན་མོ';
99 }
100 },
101 week : {
102 dow : 0, // Sunday is the first day of the week.
103 doy : 6 // The week that contains Jan 1st is the first week of the year.
104 }
105 });
106 }));