You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

129 lines
4.6 KiB

//! moment.js locale configuration
//! locale : Bengali [bn]
//! author : Kaushik Gandhi : https://github.com/kaushikgandhi
;(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined'
&& typeof require === 'function' ? factory(require('../moment')) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
//! moment.js locale configuration
var symbolMap = {
1: '১',
2: '২',
3: '৩',
4: '৪',
5: '৫',
6: '৬',
7: '৭',
8: '৮',
9: '৯',
0: '০',
},
numberMap = {
'১': '1',
'২': '2',
'৩': '3',
'৪': '4',
'৫': '5',
'৬': '6',
'৭': '7',
'৮': '8',
'৯': '9',
'০': '0',
};
var bn = moment.defineLocale('bn', {
months: 'জি_ফি_মচ_এপিল_ম_জন_জই_আগসট_সবর_অকবর_নভবর_ডিবর'.split(
'_'
),
monthsShort: 'জ_ফ_মচ_এপিল_ম_জন_জই_আগসট_সট_অক_নভ_ডি'.split(
'_'
),
weekdays: 'রবির_সমবর_মঙগলবর_বধবর_বহসপতির_শরবর_শনির'.split(
'_'
),
weekdaysShort: 'রবি_সম_মঙগল_বধ_বহসপতি_শর_শনি'.split('_'),
weekdaysMin: 'রবি_সম_মঙগল_বধ_বহ_শর_শনি'.split('_'),
longDateFormat: {
LT: 'A h:mm সময়',
LTS: 'A h:mm:ss সময়',
L: 'DD/MM/YYYY',
LL: 'D MMMM YYYY',
LLL: 'D MMMM YYYY, A h:mm সময়',
LLLL: 'dddd, D MMMM YYYY, A h:mm সময়',
},
calendar: {
sameDay: '[আজ] LT',
nextDay: '[আগল] LT',
nextWeek: 'dddd, LT',
lastDay: '[গতকল] LT',
lastWeek: '[গত] dddd, LT',
sameElse: 'L',
},
relativeTime: {
future: '%s পর',
past: '%s আগ',
s: 'কয়ক সড',
ss: '%d সড',
m: 'এক মিিট',
mm: '%d মিিট',
h: 'এক ঘন',
hh: '%d ঘন',
d: 'এক দিন',
dd: '%d দিন',
M: 'এক মস',
MM: '%d মস',
y: 'এক বছর',
yy: '%d বছর',
},
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];
});
},
meridiemParse: /রত|সকল|দর|বিল|রত/,
meridiemHour: function (hour, meridiem) {
if (hour === 12) {
hour = 0;
}
if (
(meridiem === 'রত' && hour >= 4) ||
(meridiem === 'দর' && hour < 5) ||
meridiem === 'বিল'
) {
return hour + 12;
} else {
return hour;
}
},
meridiem: function (hour, minute, isLower) {
if (hour < 4) {
return 'রত';
} else if (hour < 10) {
return 'সকল';
} else if (hour < 17) {
return 'দর';
} else if (hour < 20) {
return 'বিল';
} else {
return 'রত';
}
},
week: {
dow: 0, // Sunday is the first day of the week.
doy: 6, // The week that contains Jan 6th is the first week of the year.
},
});
return bn;
})));