NuclearDispersionSystem/ant-design-vue-jeecg/node_modules/moment/locale/pa-in.js
2023-09-14 14:47:11 +08:00

133 lines
4.9 KiB
Java
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 : Punjabi (India) [pa-in]
//! author : Harpreet Singh : https://github.com/harpreetkhalsagtbit
;(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',
};
var paIn = moment.defineLocale('pa-in', {
// There are months name as per Nanakshahi Calendar but they are not used as rigidly in modern Punjabi.
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 ਵਜੇ',
},
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];
});
},
// Punjabi 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 Punjabi.
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 paIn;
})));