2019-06-10 15:38:54 +00:00
|
|
|
|
//! moment.js locale configuration
|
2020-07-23 21:12:30 +00:00
|
|
|
|
//! locale : Hindi [hi]
|
|
|
|
|
//! author : Mayank Singhal : https://github.com/mayanksinghal
|
2019-06-10 15:38:54 +00:00
|
|
|
|
|
|
|
|
|
;(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';
|
|
|
|
|
|
2020-07-23 21:12:30 +00:00
|
|
|
|
//! moment.js locale configuration
|
2019-06-10 15:38:54 +00:00
|
|
|
|
|
|
|
|
|
var symbolMap = {
|
2020-11-24 07:16:03 +00:00
|
|
|
|
1: '१',
|
|
|
|
|
2: '२',
|
|
|
|
|
3: '३',
|
|
|
|
|
4: '४',
|
|
|
|
|
5: '५',
|
|
|
|
|
6: '६',
|
|
|
|
|
7: '७',
|
|
|
|
|
8: '८',
|
|
|
|
|
9: '९',
|
|
|
|
|
0: '०',
|
2020-07-23 21:12:30 +00:00
|
|
|
|
},
|
|
|
|
|
numberMap = {
|
|
|
|
|
'१': '1',
|
|
|
|
|
'२': '2',
|
|
|
|
|
'३': '3',
|
|
|
|
|
'४': '4',
|
|
|
|
|
'५': '5',
|
|
|
|
|
'६': '6',
|
|
|
|
|
'७': '7',
|
|
|
|
|
'८': '8',
|
|
|
|
|
'९': '9',
|
|
|
|
|
'०': '0',
|
2020-11-25 08:00:26 +00:00
|
|
|
|
},
|
|
|
|
|
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,
|
|
|
|
|
];
|
2019-06-10 15:38:54 +00:00
|
|
|
|
|
|
|
|
|
var hi = moment.defineLocale('hi', {
|
2020-11-25 08:00:26 +00:00
|
|
|
|
months: {
|
|
|
|
|
format: 'जनवरी_फ़रवरी_मार्च_अप्रैल_मई_जून_जुलाई_अगस्त_सितम्बर_अक्टूबर_नवम्बर_दिसम्बर'.split(
|
|
|
|
|
'_'
|
|
|
|
|
),
|
|
|
|
|
standalone: 'जनवरी_फरवरी_मार्च_अप्रैल_मई_जून_जुलाई_अगस्त_सितंबर_अक्टूबर_नवंबर_दिसंबर'.split(
|
|
|
|
|
'_'
|
|
|
|
|
),
|
|
|
|
|
},
|
2020-07-23 21:12:30 +00:00
|
|
|
|
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 बजे',
|
2019-06-10 15:38:54 +00:00
|
|
|
|
},
|
2020-11-25 08:00:26 +00:00
|
|
|
|
|
|
|
|
|
monthsParse: monthsParse,
|
|
|
|
|
longMonthsParse: monthsParse,
|
|
|
|
|
shortMonthsParse: shortMonthsParse,
|
|
|
|
|
|
|
|
|
|
monthsRegex: /^(जनवरी|जन\.?|फ़रवरी|फरवरी|फ़र\.?|मार्च?|अप्रैल|अप्रै\.?|मई?|जून?|जुलाई|जुल\.?|अगस्त|अग\.?|सितम्बर|सितंबर|सित\.?|अक्टूबर|अक्टू\.?|नवम्बर|नवंबर|नव\.?|दिसम्बर|दिसंबर|दिस\.?)/i,
|
|
|
|
|
|
|
|
|
|
monthsShortRegex: /^(जनवरी|जन\.?|फ़रवरी|फरवरी|फ़र\.?|मार्च?|अप्रैल|अप्रै\.?|मई?|जून?|जुलाई|जुल\.?|अगस्त|अग\.?|सितम्बर|सितंबर|सित\.?|अक्टूबर|अक्टू\.?|नवम्बर|नवंबर|नव\.?|दिसम्बर|दिसंबर|दिस\.?)/i,
|
|
|
|
|
|
|
|
|
|
monthsStrictRegex: /^(जनवरी?|फ़रवरी|फरवरी?|मार्च?|अप्रैल?|मई?|जून?|जुलाई?|अगस्त?|सितम्बर|सितंबर|सित?\.?|अक्टूबर|अक्टू\.?|नवम्बर|नवंबर?|दिसम्बर|दिसंबर?)/i,
|
|
|
|
|
|
|
|
|
|
monthsShortStrictRegex: /^(जन\.?|फ़र\.?|मार्च?|अप्रै\.?|मई?|जून?|जुल\.?|अग\.?|सित\.?|अक्टू\.?|नव\.?|दिस\.?)/i,
|
|
|
|
|
|
2020-07-23 21:12:30 +00:00
|
|
|
|
calendar: {
|
|
|
|
|
sameDay: '[आज] LT',
|
|
|
|
|
nextDay: '[कल] LT',
|
|
|
|
|
nextWeek: 'dddd, LT',
|
|
|
|
|
lastDay: '[कल] LT',
|
|
|
|
|
lastWeek: '[पिछले] dddd, LT',
|
|
|
|
|
sameElse: 'L',
|
2019-06-10 15:38:54 +00:00
|
|
|
|
},
|
2020-07-23 21:12:30 +00:00
|
|
|
|
relativeTime: {
|
|
|
|
|
future: '%s में',
|
|
|
|
|
past: '%s पहले',
|
|
|
|
|
s: 'कुछ ही क्षण',
|
|
|
|
|
ss: '%d सेकंड',
|
|
|
|
|
m: 'एक मिनट',
|
|
|
|
|
mm: '%d मिनट',
|
|
|
|
|
h: 'एक घंटा',
|
|
|
|
|
hh: '%d घंटे',
|
|
|
|
|
d: 'एक दिन',
|
|
|
|
|
dd: '%d दिन',
|
|
|
|
|
M: 'एक महीने',
|
|
|
|
|
MM: '%d महीने',
|
|
|
|
|
y: 'एक वर्ष',
|
|
|
|
|
yy: '%d वर्ष',
|
2019-06-10 15:38:54 +00:00
|
|
|
|
},
|
|
|
|
|
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: /रात|सुबह|दोपहर|शाम/,
|
2020-07-23 21:12:30 +00:00
|
|
|
|
meridiemHour: function (hour, meridiem) {
|
2019-06-10 15:38:54 +00:00
|
|
|
|
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;
|
|
|
|
|
}
|
|
|
|
|
},
|
2020-07-23 21:12:30 +00:00
|
|
|
|
meridiem: function (hour, minute, isLower) {
|
2019-06-10 15:38:54 +00:00
|
|
|
|
if (hour < 4) {
|
|
|
|
|
return 'रात';
|
|
|
|
|
} else if (hour < 10) {
|
|
|
|
|
return 'सुबह';
|
|
|
|
|
} else if (hour < 17) {
|
|
|
|
|
return 'दोपहर';
|
|
|
|
|
} else if (hour < 20) {
|
|
|
|
|
return 'शाम';
|
|
|
|
|
} else {
|
|
|
|
|
return 'रात';
|
|
|
|
|
}
|
|
|
|
|
},
|
2020-07-23 21:12:30 +00:00
|
|
|
|
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.
|
|
|
|
|
},
|
2019-06-10 15:38:54 +00:00
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
return hi;
|
|
|
|
|
|
|
|
|
|
})));
|