ibms-dome/Backend/wwwroot/js/moment/locale/hi.js
2022-10-14 16:08:54 +08:00

176 lines
7.2 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
//! locale : Hindi [hi]
//! author : Mayank Singhal : https://github.com/mayanksinghal
;(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',
},
monthsParse = [
/^जन/i,
/^फ़र|फर/i,
/^मार्च/i,
/^अप्रै/i,
/^मई/i,
/^जून/i,
/^जुल/i,
/^अग/i,
/^सितं|सित/i,
/^अक्टू/i,
/^नव|नवं/i,
/^दिसं|दिस/i,
],
shortMonthsParse = [
/^जन/i,
/^फ़र/i,
/^मार्च/i,
/^अप्रै/i,
/^मई/i,
/^जून/i,
/^जुल/i,
/^अग/i,
/^सित/i,
/^अक्टू/i,
/^नव/i,
/^दिस/i,
];
var hi = moment.defineLocale('hi', {
months: {
format: 'जनवर_फरवर_म_अप_मई_ज_ज_अगस_सितमबर_अकबर_नवमबर_दिसमबर'.split(
'_'
),
standalone: 'जनवर_फरवर_म_अप_मई_ज_ज_अगस_सिबर_अकबर_नवबर_दिबर'.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 बज',
},
monthsParse: monthsParse,
longMonthsParse: monthsParse,
shortMonthsParse: shortMonthsParse,
monthsRegex: /^(जनवरी|जन\.?|फ़रवरी|फरवरी|फ़र\.?|मार्च?|अप्रैल|अप्रै\.?|मई?|जून?|जुलाई|जुल\.?|अगस्त|अग\.?|सितम्बर|सितंबर|सित\.?|अक्टूबर|अक्टू\.?|नवम्बर|नवंबर|नव\.?|दिसम्बर|दिसंबर|दिस\.?)/i,
monthsShortRegex: /^(जनवरी|जन\.?|फ़रवरी|फरवरी|फ़र\.?|मार्च?|अप्रैल|अप्रै\.?|मई?|जून?|जुलाई|जुल\.?|अगस्त|अग\.?|सितम्बर|सितंबर|सित\.?|अक्टूबर|अक्टू\.?|नवम्बर|नवंबर|नव\.?|दिसम्बर|दिसंबर|दिस\.?)/i,
monthsStrictRegex: /^(जनवरी?|फ़रवरी|फरवरी?|मार्च?|अप्रैल?|मई?|जून?|जुलाई?|अगस्त?|सितम्बर|सितंबर|सित?\.?|अक्टूबर|अक्टू\.?|नवम्बर|नवंबर?|दिसम्बर|दिसंबर?)/i,
monthsShortStrictRegex: /^(जन\.?|फ़र\.?|मार्च?|अप्रै\.?|मई?|जून?|जुल\.?|अग\.?|सित\.?|अक्टू\.?|नव\.?|दिस\.?)/i,
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;
})));