Merge "Don't fallback from uk to ru"
[lhc/web/wiklou.git] / resources / lib / moment / locale / bn.js
1 // moment.js locale configuration
2 // locale : Bengali (bn)
3 // author : Kaushik Gandhi : https://github.com/kaushikgandhi
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('bn', {
42 months : 'জানুয়ারী_ফেবুয়ারী_মার্চ_এপ্রিল_মে_জুন_জুলাই_অগাস্ট_সেপ্টেম্বর_অক্টোবর_নভেম্বর_ডিসেম্বর'.split('_'),
43 monthsShort : 'জানু_ফেব_মার্চ_এপর_মে_জুন_জুল_অগ_সেপ্ট_অক্টো_নভ_ডিসেম্'.split('_'),
44 weekdays : 'রবিবার_সোমবার_মঙ্গলবার_বুধবার_বৃহস্পত্তিবার_শুক্রুবার_শনিবার'.split('_'),
45 weekdaysShort : 'রবি_সোম_মঙ্গল_বুধ_বৃহস্পত্তি_শুক্রু_শনি'.split('_'),
46 weekdaysMin : 'রব_সম_মঙ্গ_বু_ব্রিহ_শু_শনি'.split('_'),
47 longDateFormat : {
48 LT : 'A h:mm সময়',
49 LTS : 'A h:mm: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 : 'dddd, 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 //Bengali is a vast language its spoken
89 //in different forms in various parts of the world.
90 //I have just generalized with most common one used
91 meridiem : function (hour, minute, isLower) {
92 if (hour < 4) {
93 return 'রাত';
94 } else if (hour < 10) {
95 return 'শকাল';
96 } else if (hour < 17) {
97 return 'দুপুর';
98 } else if (hour < 20) {
99 return 'বিকেল';
100 } else {
101 return 'রাত';
102 }
103 },
104 week : {
105 dow : 0, // Sunday is the first day of the week.
106 doy : 6 // The week that contains Jan 1st is the first week of the year.
107 }
108 });
109 }));