resto-dhepot/public/assets/plugins/moment/locale/pa-in.js

133 lines
4.9 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

//! 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;
})));