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.
 
 
 
 

122 lines
4.6 KiB

//! moment.js locale configuration
//! locale : nepali/nepalese
//! author : suvash : https://github.com/suvash
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(require('../moment')) :
typeof define === 'function' && define.amd ? define(['moment'], factory) :
factory(global.moment)
}(this, function (moment) { 'use strict';
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('_'),
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 '
},
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 < 3 ? hour : hour + 12;
} else if (meridiem === 'ि') {
return hour;
} else if (meridiem === 'ि') {
return hour >= 10 ? hour : hour + 12;
} else if (meridiem === '' || meridiem === '') {
return hour + 12;
}
},
meridiem : function (hour, minute, isLower) {
if (hour < 3) {
return '';
} else if (hour < 10) {
return 'ि';
} else if (hour < 15) {
return 'ि';
} else if (hour < 18) {
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 : ' ',
m : ' ि',
mm : '%d ि',
h : ' ',
hh : '%d ',
d : ' ि',
dd : '%d ि',
M : ' ि',
MM : '%d ि',
y : ' ',
yy : '%d '
},
week : {
dow : 1, // Monday is the first day of the week.
doy : 7 // The week that contains Jan 1st is the first week of the year.
}
});
return ne;
}));