GPQAPP
1//! moment.js locale configuration
2//! locale : Punjabi (India) [pa-in]
3//! author : Harpreet Singh : https://github.com/harpreetkhalsagtbit
4
5;(function (global, factory) {6typeof exports === 'object' && typeof module !== 'undefined'7&& typeof require === 'function' ? factory(require('../moment')) :8typeof define === 'function' && define.amd ? define(['../moment'], factory) :9factory(global.moment)10}(this, (function (moment) { 'use strict';11
12//! moment.js locale configuration13
14var symbolMap = {151: '੧',162: '੨',173: '੩',184: '੪',195: '੫',206: '੬',217: '੭',228: '੮',239: '੯',240: '੦',25},26numberMap = {27'੧': '1',28'੨': '2',29'੩': '3',30'੪': '4',31'੫': '5',32'੬': '6',33'੭': '7',34'੮': '8',35'੯': '9',36'੦': '0',37};38
39var paIn = moment.defineLocale('pa-in', {40// There are months name as per Nanakshahi Calendar but they are not used as rigidly in modern Punjabi.41months: 'ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ'.split(42'_'43),44monthsShort: 'ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ'.split(45'_'46),47weekdays: 'ਐਤਵਾਰ_ਸੋਮਵਾਰ_ਮੰਗਲਵਾਰ_ਬੁਧਵਾਰ_ਵੀਰਵਾਰ_ਸ਼ੁੱਕਰਵਾਰ_ਸ਼ਨੀਚਰਵਾਰ'.split(48'_'49),50weekdaysShort: 'ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ'.split('_'),51weekdaysMin: 'ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ'.split('_'),52longDateFormat: {53LT: 'A h:mm ਵਜੇ',54LTS: 'A h:mm:ss ਵਜੇ',55L: 'DD/MM/YYYY',56LL: 'D MMMM YYYY',57LLL: 'D MMMM YYYY, A h:mm ਵਜੇ',58LLLL: 'dddd, D MMMM YYYY, A h:mm ਵਜੇ',59},60calendar: {61sameDay: '[ਅਜ] LT',62nextDay: '[ਕਲ] LT',63nextWeek: '[ਅਗਲਾ] dddd, LT',64lastDay: '[ਕਲ] LT',65lastWeek: '[ਪਿਛਲੇ] dddd, LT',66sameElse: 'L',67},68relativeTime: {69future: '%s ਵਿੱਚ',70past: '%s ਪਿਛਲੇ',71s: 'ਕੁਝ ਸਕਿੰਟ',72ss: '%d ਸਕਿੰਟ',73m: 'ਇਕ ਮਿੰਟ',74mm: '%d ਮਿੰਟ',75h: 'ਇੱਕ ਘੰਟਾ',76hh: '%d ਘੰਟੇ',77d: 'ਇੱਕ ਦਿਨ',78dd: '%d ਦਿਨ',79M: 'ਇੱਕ ਮਹੀਨਾ',80MM: '%d ਮਹੀਨੇ',81y: 'ਇੱਕ ਸਾਲ',82yy: '%d ਸਾਲ',83},84preparse: function (string) {85return string.replace(/[੧੨੩੪੫੬੭੮੯੦]/g, function (match) {86return numberMap[match];87});88},89postformat: function (string) {90return string.replace(/\d/g, function (match) {91return symbolMap[match];92});93},94// Punjabi notation for meridiems are quite fuzzy in practice. While there exists95// a rigid notion of a 'Pahar' it is not used as rigidly in modern Punjabi.96meridiemParse: /ਰਾਤ|ਸਵੇਰ|ਦੁਪਹਿਰ|ਸ਼ਾਮ/,97meridiemHour: function (hour, meridiem) {98if (hour === 12) {99hour = 0;100}101if (meridiem === 'ਰਾਤ') {102return hour < 4 ? hour : hour + 12;103} else if (meridiem === 'ਸਵੇਰ') {104return hour;105} else if (meridiem === 'ਦੁਪਹਿਰ') {106return hour >= 10 ? hour : hour + 12;107} else if (meridiem === 'ਸ਼ਾਮ') {108return hour + 12;109}110},111meridiem: function (hour, minute, isLower) {112if (hour < 4) {113return 'ਰਾਤ';114} else if (hour < 10) {115return 'ਸਵੇਰ';116} else if (hour < 17) {117return 'ਦੁਪਹਿਰ';118} else if (hour < 20) {119return 'ਸ਼ਾਮ';120} else {121return 'ਰਾਤ';122}123},124week: {125dow: 0, // Sunday is the first day of the week.126doy: 6, // The week that contains Jan 6th is the first week of the year.127},128});129
130return paIn;131
132})));133