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