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';
38 var pa_in
= moment
.defineLocale('pa-in', {
39 // There are months name as per Nanakshahi Calender but they are not used as rigidly in modern Punjabi.
40 months
: 'ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ'.split('_'),
41 monthsShort
: 'ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ'.split('_'),
42 weekdays
: 'ਐਤਵਾਰ_ਸੋਮਵਾਰ_ਮੰਗਲਵਾਰ_ਬੁਧਵਾਰ_ਵੀਰਵਾਰ_ਸ਼ੁੱਕਰਵਾਰ_ਸ਼ਨੀਚਰਵਾਰ'.split('_'),
43 weekdaysShort
: 'ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ'.split('_'),
44 weekdaysMin
: 'ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ'.split('_'),
47 LTS
: 'A h:mm:ss ਵਜੇ',
50 LLL
: 'D MMMM YYYY, A h:mm ਵਜੇ',
51 LLLL
: 'dddd, D MMMM YYYY, A h:mm ਵਜੇ'
56 nextWeek
: 'dddd, LT',
58 lastWeek
: '[ਪਿਛਲੇ] dddd, LT',
76 preparse: function (string
) {
77 return string
.replace(/[੧੨੩੪੫੬੭੮੯੦]/g, function (match
) {
78 return numberMap
[match
];
81 postformat: function (string
) {
82 return string
.replace(/\d/g, function (match
) {
83 return symbolMap
[match
];
86 // Punjabi notation for meridiems are quite fuzzy in practice. While there exists
87 // a rigid notion of a 'Pahar' it is not used as rigidly in modern Punjabi.
88 meridiemParse
: /ਰਾਤ|ਸਵੇਰ|ਦੁਪਹਿਰ|ਸ਼ਾਮ/,
89 meridiemHour : function (hour
, meridiem
) {
93 if (meridiem
=== 'ਰਾਤ') {
94 return hour
< 4 ? hour
: hour
+ 12;
95 } else if (meridiem
=== 'ਸਵੇਰ') {
97 } else if (meridiem
=== 'ਦੁਪਹਿਰ') {
98 return hour
>= 10 ? hour
: hour
+ 12;
99 } else if (meridiem
=== 'ਸ਼ਾਮ') {
103 meridiem : function (hour
, minute
, isLower
) {
106 } else if (hour
< 10) {
108 } else if (hour
< 17) {
110 } else if (hour
< 20) {
117 dow
: 0, // Sunday is the first day of the week.
118 doy
: 6 // The week that contains Jan 1st is the first week of the year.