Merge "Improve docs for Title::getInternalURL/getCanonicalURL"
[lhc/web/wiklou.git] / resources / lib / moment / locale / hi.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 hi = moment.defineLocale('hi', {
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 // Hindi 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 Hindi.
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 hi;
122
123 })));