UNPKG

3.76 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
7;(function (global, factory) {
8 typeof exports === 'object' && typeof module !== 'undefined'
9 && typeof require === 'function' ? factory(require('../moment')) :
10 typeof define === 'function' && define.amd ? define(['../moment'], factory) :
11 factory(global.moment)
12}(this, (function (moment) { 'use strict';
13
14 //! moment.js locale configuration
15
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 var my = moment.defineLocale('my', {
42 months: 'ဇန်နဝါရီ_ဖေဖော်ဝါရီ_မတ်_ဧပြီ_မေ_ဇွန်_ဇူလိုင်_သြဂုတ်_စက်တင်ဘာ_အောက်တိုဘာ_နိုဝင်ဘာ_ဒီဇင်ဘာ'.split(
43 '_'
44 ),
45 monthsShort: 'ဇန်_ဖေ_မတ်_ပြီ_မေ_ဇွန်_လိုင်_သြ_စက်_အောက်_နို_ဒီ'.split('_'),
46 weekdays: 'တနင်္ဂနွေ_တနင်္လာ_အင်္ဂါ_ဗုဒ္ဓဟူး_ကြာသပတေး_သောကြာ_စနေ'.split(
47 '_'
48 ),
49 weekdaysShort: 'နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ'.split('_'),
50 weekdaysMin: 'နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ'.split('_'),
51
52 longDateFormat: {
53 LT: 'HH:mm',
54 LTS: 'HH:mm:ss',
55 L: 'DD/MM/YYYY',
56 LL: 'D MMMM YYYY',
57 LLL: 'D MMMM YYYY HH:mm',
58 LLLL: 'dddd D MMMM YYYY HH:mm',
59 },
60 calendar: {
61 sameDay: '[ယနေ.] LT [မှာ]',
62 nextDay: '[မနက်ဖြန်] LT [မှာ]',
63 nextWeek: 'dddd LT [မှာ]',
64 lastDay: '[မနေ.က] LT [မှာ]',
65 lastWeek: '[ပြီးခဲ့သော] dddd LT [မှာ]',
66 sameElse: 'L',
67 },
68 relativeTime: {
69 future: 'လာမည့် %s မှာ',
70 past: 'လွန်ခဲ့သော %s က',
71 s: 'စက္ကန်.အနည်းငယ်',
72 ss: '%d စက္ကန့်',
73 m: 'တစ်မိနစ်',
74 mm: '%d မိနစ်',
75 h: 'တစ်နာရီ',
76 hh: '%d နာရီ',
77 d: 'တစ်ရက်',
78 dd: '%d ရက်',
79 M: 'တစ်လ',
80 MM: '%d လ',
81 y: 'တစ်နှစ်',
82 yy: '%d နှစ်',
83 },
84 preparse: function (string) {
85 return string.replace(/[၁၂၃၄၅၆၇၈၉၀]/g, function (match) {
86 return numberMap[match];
87 });
88 },
89 postformat: function (string) {
90 return string.replace(/\d/g, function (match) {
91 return symbolMap[match];
92 });
93 },
94 week: {
95 dow: 1, // Monday is the first day of the week.
96 doy: 4, // The week that contains Jan 4th is the first week of the year.
97 },
98 });
99
100 return my;
101
102})));