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.

132 lines
4.7 KiB

//! moment.js locale configuration
//! locale : Nepalese [ne]
//! author : suvash : https://github.com/suvash
;(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 ne = moment.defineLocale('ne', {
months: 'जनवर_फवर_मच_अपिल_मई_जन_जई_अगषट_सबर_अकबर_नबर_डिबर'.split(
'_'
),
monthsShort: 'जन._फ._मच_अपि._मई_जन_जई._अग._सट._अक._न._डि.'.split(
'_'
),
monthsParseExact: true,
weekdays: 'आइतबर_समबर_मङगलबर_बधबर_बििर_शरबर_शनिर'.split(
'_'
),
weekdaysShort: 'आइत._सम._मङगल._बध._बिि._शर._शनि.'.split('_'),
weekdaysMin: 'आ._स._म._ब._बि._श._श.'.split('_'),
weekdaysParseExact: true,
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 बज',
},
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 === 'रि') {
return hour < 4 ? hour : hour + 12;
} else if (meridiem === 'बिन') {
return hour;
} else if (meridiem === 'दि') {
return hour >= 10 ? hour : hour + 12;
} else if (meridiem === 'सझ') {
return hour + 12;
}
},
meridiem: function (hour, minute, isLower) {
if (hour < 3) {
return 'रि';
} else if (hour < 12) {
return 'बिन';
} else if (hour < 16) {
return 'दि';
} else if (hour < 20) {
return 'सझ';
} else {
return 'रि';
}
},
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 बरष',
},
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 ne;
})));