UNPKG

3.09 kBJavaScriptView Raw
1//! moment.js locale configuration
2//! locale : Burmese [my]
3//! author : Squar team, mysquar.com
4//! author : David Rossellat : https://github.com/gholadr
5//! author : Tin Aung Lin : https://github.com/thanyawzinmin
6
7import moment from '../moment';
8
9var symbolMap = {
10 1: '၁',
11 2: '၂',
12 3: '၃',
13 4: '၄',
14 5: '၅',
15 6: '၆',
16 7: '၇',
17 8: '၈',
18 9: '၉',
19 0: '၀',
20 },
21 numberMap = {
22 '၁': '1',
23 '၂': '2',
24 '၃': '3',
25 '၄': '4',
26 '၅': '5',
27 '၆': '6',
28 '၇': '7',
29 '၈': '8',
30 '၉': '9',
31 '၀': '0',
32 };
33
34export default moment.defineLocale('my', {
35 months: 'ဇန်နဝါရီ_ဖေဖော်ဝါရီ_မတ်_ဧပြီ_မေ_ဇွန်_ဇူလိုင်_သြဂုတ်_စက်တင်ဘာ_အောက်တိုဘာ_နိုဝင်ဘာ_ဒီဇင်ဘာ'.split(
36 '_'
37 ),
38 monthsShort: 'ဇန်_ဖေ_မတ်_ပြီ_မေ_ဇွန်_လိုင်_သြ_စက်_အောက်_နို_ဒီ'.split('_'),
39 weekdays: 'တနင်္ဂနွေ_တနင်္လာ_အင်္ဂါ_ဗုဒ္ဓဟူး_ကြာသပတေး_သောကြာ_စနေ'.split(
40 '_'
41 ),
42 weekdaysShort: 'နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ'.split('_'),
43 weekdaysMin: 'နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ'.split('_'),
44
45 longDateFormat: {
46 LT: 'HH:mm',
47 LTS: 'HH:mm:ss',
48 L: 'DD/MM/YYYY',
49 LL: 'D MMMM YYYY',
50 LLL: 'D MMMM YYYY HH:mm',
51 LLLL: 'dddd D MMMM YYYY HH:mm',
52 },
53 calendar: {
54 sameDay: '[ယနေ.] LT [မှာ]',
55 nextDay: '[မနက်ဖြန်] LT [မှာ]',
56 nextWeek: 'dddd LT [မှာ]',
57 lastDay: '[မနေ.က] LT [မှာ]',
58 lastWeek: '[ပြီးခဲ့သော] dddd LT [မှာ]',
59 sameElse: 'L',
60 },
61 relativeTime: {
62 future: 'လာမည့် %s မှာ',
63 past: 'လွန်ခဲ့သော %s က',
64 s: 'စက္ကန်.အနည်းငယ်',
65 ss: '%d စက္ကန့်',
66 m: 'တစ်မိနစ်',
67 mm: '%d မိနစ်',
68 h: 'တစ်နာရီ',
69 hh: '%d နာရီ',
70 d: 'တစ်ရက်',
71 dd: '%d ရက်',
72 M: 'တစ်လ',
73 MM: '%d လ',
74 y: 'တစ်နှစ်',
75 yy: '%d နှစ်',
76 },
77 preparse: function (string) {
78 return string.replace(/[၁၂၃၄၅၆၇၈၉၀]/g, function (match) {
79 return numberMap[match];
80 });
81 },
82 postformat: function (string) {
83 return string.replace(/\d/g, function (match) {
84 return symbolMap[match];
85 });
86 },
87 week: {
88 dow: 1, // Monday is the first day of the week.
89 doy: 4, // The week that contains Jan 4th is the first week of the year.
90 },
91});