1 //! moment.js locale configuration
2 //! locale : Punjabi (India) [pa-in]
3 //! author : Harpreet Singh : https://github.com/harpreetkhalsagtbit
5 ;(function (global, factory) {
6 typeof exports === 'object' && typeof module !== 'undefined'
7 && typeof require === 'function' ? factory(require('../moment')) :
8 typeof define === 'function' && define.amd ? define(['../moment'], factory) :
10 }(this, (function (moment) { 'use strict';
12 //! moment.js locale configuration
39 var paIn = moment.defineLocale('pa-in', {
40 // There are months name as per Nanakshahi Calendar but they are not used as rigidly in modern Punjabi.
41 months: 'ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ'.split(
44 monthsShort: 'ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ'.split(
47 weekdays: 'ਐਤਵਾਰ_ਸੋਮਵਾਰ_ਮੰਗਲਵਾਰ_ਬੁਧਵਾਰ_ਵੀਰਵਾਰ_ਸ਼ੁੱਕਰਵਾਰ_ਸ਼ਨੀਚਰਵਾਰ'.split(
50 weekdaysShort: 'ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ'.split('_'),
51 weekdaysMin: 'ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ'.split('_'),
57 LLL: 'D MMMM YYYY, A h:mm ਵਜੇ',
58 LLLL: 'dddd, D MMMM YYYY, A h:mm ਵਜੇ',
63 nextWeek: '[ਅਗਲਾ] dddd, LT',
65 lastWeek: '[ਪਿਛਲੇ] dddd, LT',
84 preparse: function (string) {
85 return string.replace(/[੧੨੩੪੫੬੭੮੯੦]/g, function (match) {
86 return numberMap[match];
89 postformat: function (string) {
90 return string.replace(/\d/g, function (match) {
91 return symbolMap[match];
94 // Punjabi notation for meridiems are quite fuzzy in practice. While there exists
95 // a rigid notion of a 'Pahar' it is not used as rigidly in modern Punjabi.
96 meridiemParse: /ਰਾਤ|ਸਵੇਰ|ਦੁਪਹਿਰ|ਸ਼ਾਮ/,
97 meridiemHour: function (hour, meridiem) {
101 if (meridiem === 'ਰਾਤ') {
102 return hour < 4 ? hour : hour + 12;
103 } else if (meridiem === 'ਸਵੇਰ') {
105 } else if (meridiem === 'ਦੁਪਹਿਰ') {
106 return hour >= 10 ? hour : hour + 12;
107 } else if (meridiem === 'ਸ਼ਾਮ') {
111 meridiem: function (hour, minute, isLower) {
114 } else if (hour < 10) {
116 } else if (hour < 17) {
118 } else if (hour < 20) {
125 dow: 0, // Sunday is the first day of the week.
126 doy: 6, // The week that contains Jan 6th is the first week of the year.