Brought in another asset for Ray's eye form: moment
[openemr.git] / public / assets / moment-2-13-0 / locale / pa-in.js
blob1d4e366b2adf142e74d88d06003807de8d1aeaba
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) :
9    factory(global.moment)
10 }(this, function (moment) { 'use strict';
13     var symbolMap = {
14         '1': '੧',
15         '2': '੨',
16         '3': '੩',
17         '4': '੪',
18         '5': '੫',
19         '6': '੬',
20         '7': '੭',
21         '8': '੮',
22         '9': '੯',
23         '0': '੦'
24     },
25     numberMap = {
26         '੧': '1',
27         '੨': '2',
28         '੩': '3',
29         '੪': '4',
30         '੫': '5',
31         '੬': '6',
32         '੭': '7',
33         '੮': '8',
34         '੯': '9',
35         '੦': '0'
36     };
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('_'),
45         longDateFormat : {
46             LT : 'A h:mm ਵਜੇ',
47             LTS : 'A h:mm:ss ਵਜੇ',
48             L : 'DD/MM/YYYY',
49             LL : 'D MMMM YYYY',
50             LLL : 'D MMMM YYYY, A h:mm ਵਜੇ',
51             LLLL : 'dddd, D MMMM YYYY, A h:mm ਵਜੇ'
52         },
53         calendar : {
54             sameDay : '[ਅਜ] LT',
55             nextDay : '[ਕਲ] LT',
56             nextWeek : 'dddd, LT',
57             lastDay : '[ਕਲ] LT',
58             lastWeek : '[ਪਿਛਲੇ] dddd, LT',
59             sameElse : 'L'
60         },
61         relativeTime : {
62             future : '%s ਵਿੱਚ',
63             past : '%s ਪਿਛਲੇ',
64             s : 'ਕੁਝ ਸਕਿੰਟ',
65             m : 'ਇਕ ਮਿੰਟ',
66             mm : '%d ਮਿੰਟ',
67             h : 'ਇੱਕ ਘੰਟਾ',
68             hh : '%d ਘੰਟੇ',
69             d : 'ਇੱਕ ਦਿਨ',
70             dd : '%d ਦਿਨ',
71             M : 'ਇੱਕ ਮਹੀਨਾ',
72             MM : '%d ਮਹੀਨੇ',
73             y : 'ਇੱਕ ਸਾਲ',
74             yy : '%d ਸਾਲ'
75         },
76         preparse: function (string) {
77             return string.replace(/[੧੨੩੪੫੬੭੮੯੦]/g, function (match) {
78                 return numberMap[match];
79             });
80         },
81         postformat: function (string) {
82             return string.replace(/\d/g, function (match) {
83                 return symbolMap[match];
84             });
85         },
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) {
90             if (hour === 12) {
91                 hour = 0;
92             }
93             if (meridiem === 'ਰਾਤ') {
94                 return hour < 4 ? hour : hour + 12;
95             } else if (meridiem === 'ਸਵੇਰ') {
96                 return hour;
97             } else if (meridiem === 'ਦੁਪਹਿਰ') {
98                 return hour >= 10 ? hour : hour + 12;
99             } else if (meridiem === 'ਸ਼ਾਮ') {
100                 return hour + 12;
101             }
102         },
103         meridiem : function (hour, minute, isLower) {
104             if (hour < 4) {
105                 return 'ਰਾਤ';
106             } else if (hour < 10) {
107                 return 'ਸਵੇਰ';
108             } else if (hour < 17) {
109                 return 'ਦੁਪਹਿਰ';
110             } else if (hour < 20) {
111                 return 'ਸ਼ਾਮ';
112             } else {
113                 return 'ਰਾਤ';
114             }
115         },
116         week : {
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.
119         }
120     });
122     return pa_in;
124 }));