Debian Codegraph @

resources/lib/moment/locale/bo.js

raw symbols SCIP
1 //! moment.js locale configuration
2 //! locale : Tibetan [bo]
3 //! author : Thupten N. Chakrishar : https://github.com/vajradog
4
5 ;(function (global, factory) {
6 typeof exports === 'object' && typeof module !== 'undefined'
7 && typeof require === 'function' ? factory(require('../moment')) :
8 typeof define === 'function' && define.amd ? define(['../moment'], factory) :
9 factory(global.moment)
10 }(this, (function (moment) { 'use strict';
11
12 //! moment.js locale configuration
13
14 var symbolMap = {
15 '1': '༡',
16 '2': '༢',
17 '3': '༣',
18 '4': '༤',
19 '5': '༥',
20 '6': '༦',
21 '7': '༧',
22 '8': '༨',
23 '9': '༩',
24 '0': '༠',
25 },
26 numberMap = {
27 '༡': '1',
28 '༢': '2',
29 '༣': '3',
30 '༤': '4',
31 '༥': '5',
32 '༦': '6',
33 '༧': '7',
34 '༨': '8',
35 '༩': '9',
36 '༠': '0',
37 };
38
39 var bo = moment.defineLocale('bo', {
40 months: 'ཟླ་བ་དང་པོ_ཟླ་བ་གཉིས་པ_ཟླ་བ་གསུམ་པ_ཟླ་བ་བཞི་པ_ཟླ་བ་ལྔ་པ_ཟླ་བ་དྲུག་པ_ཟླ་བ་བདུན་པ_ཟླ་བ་བརྒྱད་པ_ཟླ་བ་དགུ་པ_ཟླ་བ་བཅུ་པ_ཟླ་བ་བཅུ་གཅིག་པ_ཟླ་བ་བཅུ་གཉིས་པ'.split(
41 '_'
42 ),
43 monthsShort: 'ཟླ་1_ཟླ་2_ཟླ་3_ཟླ་4_ཟླ་5_ཟླ་6_ཟླ་7_ཟླ་8_ཟླ་9_ཟླ་10_ཟླ་11_ཟླ་12'.split(
44 '_'
45 ),
46 monthsShortRegex: /^(ཟླ་\d{1,2})/,
47 monthsParseExact: true,
48 weekdays: 'གཟའ་ཉི་མ་_གཟའ་ཟླ་བ་_གཟའ་མིག་དམར་_གཟའ་ལྷག་པ་_གཟའ་ཕུར་བུ_གཟའ་པ་སངས་_གཟའ་སྤེན་པ་'.split(
49 '_'
50 ),
51 weekdaysShort: 'ཉི་མ་_ཟླ་བ་_མིག་དམར་_ལྷག་པ་_ཕུར་བུ_པ་སངས་_སྤེན་པ་'.split(
52 '_'
53 ),
54 weekdaysMin: 'ཉི_ཟླ_མིག_ལྷག_ཕུར_སངས_སྤེན'.split('_'),
55 longDateFormat: {
56 LT: 'A h:mm',
57 LTS: 'A h:mm:ss',
58 L: 'DD/MM/YYYY',
59 LL: 'D MMMM YYYY',
60 LLL: 'D MMMM YYYY, A h:mm',
61 LLLL: 'dddd, D MMMM YYYY, A h:mm',
62 },
63 calendar: {
64 sameDay: '[དི་རིང] LT',
65 nextDay: '[སང་ཉིན] LT',
66 nextWeek: '[བདུན་ཕྲག་རྗེས་མ], LT',
67 lastDay: '[ཁ་སང] LT',
68 lastWeek: '[བདུན་ཕྲག་མཐའ་མ] dddd, LT',
69 sameElse: 'L',
70 },
71 relativeTime: {
72 future: '%s ལ་',
73 past: '%s སྔན་ལ',
74 s: 'ལམ་སང',
75 ss: '%d སྐར་ཆ།',
76 m: 'སྐར་མ་གཅིག',
77 mm: '%d སྐར་མ',
78 h: 'ཆུ་ཚོད་གཅིག',
79 hh: '%d ཆུ་ཚོད',
80 d: 'ཉིན་གཅིག',
81 dd: '%d ཉིན་',
82 M: 'ཟླ་བ་གཅིག',
83 MM: '%d ཟླ་བ',
84 y: 'ལོ་གཅིག',
85 yy: '%d ལོ',
86 },
87 preparse: function (string) {
88 return string.replace(/[༡༢༣༤༥༦༧༨༩༠]/g, function (match) {
89 return numberMap[match];
90 });
91 },
92 postformat: function (string) {
93 return string.replace(/\d/g, function (match) {
94 return symbolMap[match];
95 });
96 },
97 meridiemParse: /མཚན་མོ|ཞོགས་ཀས|ཉིན་གུང|དགོང་དག|མཚན་མོ/,
98 meridiemHour: function (hour, meridiem) {
99 if (hour === 12) {
100 hour = 0;
101 }
102 if (
103 (meridiem === 'མཚན་མོ' && hour >= 4) ||
104 (meridiem === 'ཉིན་གུང' && hour < 5) ||
105 meridiem === 'དགོང་དག'
106 ) {
107 return hour + 12;
108 } else {
109 return hour;
110 }
111 },
112 meridiem: function (hour, minute, isLower) {
113 if (hour < 4) {
114 return 'མཚན་མོ';
115 } else if (hour < 10) {
116 return 'ཞོགས་ཀས';
117 } else if (hour < 17) {
118 return 'ཉིན་གུང';
119 } else if (hour < 20) {
120 return 'དགོང་དག';
121 } else {
122 return 'མཚན་མོ';
123 }
124 },
125 week: {
126 dow: 0, // Sunday is the first day of the week.
127 doy: 6, // The week that contains Jan 6th is the first week of the year.
128 },
129 });
130
131 return bo;
132
133 })));