//! moment.js locale configuration
//! locale : Marathi (mr)
//! author : Harshad Kale : https://github.com/kalehv
//! author : Vivek Athalye : https://github.com/vnathalye
;(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';
var symbolMap = {
'1': '?',
'2': '?',
'3': '?',
'4': '?',
'5': '?',
'6': '?',
'7': '?',
'8': '?',
'9': '?',
'0': '?'
},
numberMap = {
'?': '1',
'?': '2',
'?': '3',
'?': '4',
'?': '5',
'?': '6',
'?': '7',
'?': '8',
'?': '9',
'?': '0'
};
function relativeTimeMr(number, withoutSuffix, string, isFuture)
{
var output = '';
if (withoutSuffix) {
switch (string) {
case 's': output = '???? ?????'; break;
case 'm': output = '?? ?????'; break;
case 'mm': output = '%d ??????'; break;
case 'h': output = '?? ???'; break;
case 'hh': output = '%d ???'; break;
case 'd': output = '?? ????'; break;
case 'dd': output = '%d ????'; break;
case 'M': output = '?? ?????'; break;
case 'MM': output = '%d ?????'; break;
case 'y': output = '?? ????'; break;
case 'yy': output = '%d ?????'; break;
}
}
else {
switch (string) {
case 's': output = '???? ???????'; break;
case 'm': output = '??? ??????'; break;
case 'mm': output = '%d ???????'; break;
case 'h': output = '??? ????'; break;
case 'hh': output = '%d ?????'; break;
case 'd': output = '??? ?????'; break;
case 'dd': output = '%d ??????'; break;
case 'M': output = '??? ???????'; break;
case 'MM': output = '%d ????????'; break;
case 'y': output = '??? ?????'; break;
case 'yy': output = '%d ??????'; break;
}
}
return output.replace(/%d/i, number);
}
var mr = moment.defineLocale('mr', {
months : '????????_??????????_?????_??????_??_???_????_?????_????????_???????_?????????_???????'.split('_'),
monthsShort: '????._??????._?????._?????._??._???._????._??._??????._?????._???????._?????.'.split('_'),
monthsParseExact : true,
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: relativeTimeMr,
m: relativeTimeMr,
mm: relativeTimeMr,
h: relativeTimeMr,
hh: relativeTimeMr,
d: relativeTimeMr,
dd: relativeTimeMr,
M: relativeTimeMr,
MM: relativeTimeMr,
y: relativeTimeMr,
yy: relativeTimeMr
},
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 < 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 1st is the first week of the year.
}
});
return mr;
}));
|