MIF_E31221322/public/assets/libs/moment/locale/hi.js

124 lines
4.4 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

//! moment.js locale configuration
;(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'
};
var hi = moment.defineLocale('hi', {
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 : ' षण',
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];
});
},
// Hindi notation for meridiems are quite fuzzy in practice. While there exists
// a rigid notion of a 'Pahar' it is not used as rigidly in modern Hindi.
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 6th is the first week of the year.
}
});
return hi;
})));