ledgerrb/public/app/bower_components/moment/locale/bn.js

107 lines
3.9 KiB
JavaScript
Raw Normal View History

2014-09-30 12:29:53 +02:00
// moment.js locale configuration
// locale : Bengali (bn)
2014-07-31 18:00:20 +02:00
// author : Kaushik Gandhi : https://github.com/kaushikgandhi
(function (factory) {
if (typeof define === 'function' && define.amd) {
define(['moment'], factory); // AMD
} else if (typeof exports === 'object') {
module.exports = factory(require('../moment')); // Node
} else {
factory(window.moment); // Browser global
}
}(function (moment) {
var symbolMap = {
'1': '১',
'2': '২',
'3': '৩',
'4': '',
'5': '৫',
'6': '৬',
'7': '',
'8': '৮',
'9': '৯',
'0': ''
},
numberMap = {
'১': '1',
'২': '2',
'৩': '3',
'': '4',
'৫': '5',
'৬': '6',
'': '7',
'৮': '8',
'৯': '9',
'': '0'
};
2014-09-30 12:29:53 +02:00
return moment.defineLocale('bn', {
months : 'জানুয়ারী_ফেবুয়ারী_মার্চ_এপ্রিল_মে_জুন_জুলাই_অগাস্ট_সেপ্টেম্বর_অক্টোবর_নভেম্বর_ডিসেম্বর'.split('_'),
monthsShort : 'জানু_ফেব_মার্চ_এপর_মে_জুন_জুল_অগ_সেপ্ট_অক্টো_নভ_ডিসেম্'.split('_'),
weekdays : 'রবিবার_সোমবার_মঙ্গলবার_বুধবার_বৃহস্পত্তিবার_শুক্রুবার_শনিবার'.split('_'),
weekdaysShort : 'রবি_সোম_মঙ্গল_বুধ_বৃহস্পত্তি_শুক্রু_শনি'.split('_'),
weekdaysMin : 'রব_সম_মঙ্গ_বু_ব্রিহ_শু_শনি'.split('_'),
2014-07-31 18:00:20 +02:00
longDateFormat : {
2014-09-30 12:29:53 +02:00
LT : 'A h:mm সময়',
L : 'DD/MM/YYYY',
LL : 'D MMMM YYYY',
LLL : 'D MMMM YYYY, LT',
LLLL : 'dddd, D MMMM YYYY, LT'
2014-07-31 18:00:20 +02:00
},
calendar : {
sameDay : '[আজ] LT',
nextDay : '[আগামীকাল] LT',
nextWeek : 'dddd, LT',
lastDay : '[গতকাল] LT',
lastWeek : '[গত] dddd, LT',
sameElse : 'L'
},
relativeTime : {
2014-09-30 12:29:53 +02:00
future : '%s পরে',
past : '%s আগে',
s : 'কএক সেকেন্ড',
m : 'এক মিনিট',
mm : '%d মিনিট',
h : 'এক ঘন্টা',
hh : '%d ঘন্টা',
d : 'এক দিন',
dd : '%d দিন',
M : 'এক মাস',
MM : '%d মাস',
y : 'এক বছর',
yy : '%d বছর'
2014-07-31 18:00:20 +02:00
},
preparse: function (string) {
return string.replace(/[১২৩৪৫৬৭৮৯০]/g, function (match) {
return numberMap[match];
});
},
postformat: function (string) {
return string.replace(/\d/g, function (match) {
return symbolMap[match];
});
},
2014-09-30 12:29:53 +02:00
//Bengali is a vast language its spoken
2014-07-31 18:00:20 +02:00
//in different forms in various parts of the world.
//I have just generalized with most common one used
meridiem : function (hour, minute, isLower) {
if (hour < 4) {
2014-09-30 12:29:53 +02:00
return 'রাত';
2014-07-31 18:00:20 +02:00
} else if (hour < 10) {
2014-09-30 12:29:53 +02:00
return 'শকাল';
2014-07-31 18:00:20 +02:00
} else if (hour < 17) {
2014-09-30 12:29:53 +02:00
return 'দুপুর';
2014-07-31 18:00:20 +02:00
} else if (hour < 20) {
2014-09-30 12:29:53 +02:00
return 'বিকেল';
2014-07-31 18:00:20 +02:00
} else {
2014-09-30 12:29:53 +02:00
return 'রাত';
2014-07-31 18:00:20 +02:00
}
},
week : {
dow : 0, // Sunday is the first day of the week.
doy : 6 // The week that contains Jan 1st is the first week of the year.
}
});
}));