货无忧
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.
 
 
 
 
 

72 lines
2.2 KiB

// Bengali [bn]
import dayjs from '../index';
var symbolMap = {
1: '১',
2: '২',
3: '৩',
4: '৪',
5: '৫',
6: '৬',
7: '৭',
8: '৮',
9: '৯',
0: '০'
};
var numberMap = {
'১': '1',
'২': '2',
'৩': '3',
'৪': '4',
'৫': '5',
'৬': '6',
'৭': '7',
'৮': '8',
'৯': '9',
'০': '0'
};
var locale = {
name: 'bn',
weekdays: 'রবির_সমবর_মঙগলবর_বধবর_বহসপতির_শরবর_শনির'.split('_'),
months: 'জি_ফি_মচ_এপিল_ম_জন_জই_আগসট_সবর_অকবর_নভবর_ডিবর'.split('_'),
weekdaysShort: 'রবি_সম_মঙগল_বধ_বহসপতি_শর_শনি'.split('_'),
monthsShort: 'জ_ফ_মচ_এপিল_ম_জন_জই_আগসট_সট_অক_নভ_ডি'.split('_'),
weekdaysMin: 'রবি_সম_মঙগ_বধ_ব_শর_শনি'.split('_'),
preparse: function preparse(string) {
return string.replace(/[১২৩৪৫৬৭৮৯০]/g, function (match) {
return numberMap[match];
});
},
postformat: function postformat(string) {
return string.replace(/\d/g, function (match) {
return symbolMap[match];
});
},
ordinal: function ordinal(n) {
return n;
},
formats: {
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 সময়'
},
relativeTime: {
future: '%s পর',
past: '%s আগ',
s: 'কয়ক সড',
m: 'এক মিিট',
mm: '%d মিিট',
h: 'এক ঘন',
hh: '%d ঘন',
d: 'এক দিন',
dd: '%d দিন',
M: 'এক মস',
MM: '%d মস',
y: 'এক বছর',
yy: '%d বছর'
}
};
dayjs.locale(locale, null, true);
export default locale;