Merge "Improve docs for Title::getInternalURL/getCanonicalURL"
[lhc/web/wiklou.git] / resources / lib / moment / locale / gu.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 gu = moment.defineLocale('gu', {
37 months: 'જાન્યુઆરી_ફેબ્રુઆરી_માર્ચ_એપ્રિલ_મે_જૂન_જુલાઈ_ઑગસ્ટ_સપ્ટેમ્બર_ઑક્ટ્બર_નવેમ્બર_ડિસેમ્બર'.split('_'),
38 monthsShort: 'જાન્યુ._ફેબ્રુ._માર્ચ_એપ્રિ._મે_જૂન_જુલા._ઑગ._સપ્ટે._ઑક્ટ્._નવે._ડિસે.'.split('_'),
39 monthsParseExact: true,
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 // Gujarati 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 Gujarati.
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 gu;
122
123 })));