Merge "Increase Opera minimum for Grades A and C to 15"
[lhc/web/wiklou.git] / resources / lib / moment / locale / hi.js
1 //! moment.js locale configuration
2 //! locale : Hindi [hi]
3 //! author : Mayank Singhal : https://github.com/mayanksinghal
4
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';
11
12
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 var numberMap = {
26 '१': '1',
27 '२': '2',
28 '३': '3',
29 '४': '4',
30 '५': '5',
31 '६': '6',
32 '७': '7',
33 '८': '8',
34 '९': '9',
35 '०': '0'
36 };
37
38 var hi = moment.defineLocale('hi', {
39 months : 'जनवरी_फ़रवरी_मार्च_अप्रैल_मई_जून_जुलाई_अगस्त_सितम्बर_अक्टूबर_नवम्बर_दिसम्बर'.split('_'),
40 monthsShort : 'जन._फ़र._मार्च_अप्रै._मई_जून_जुल._अग._सित._अक्टू._नव._दिस.'.split('_'),
41 monthsParseExact: true,
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 // Hindi 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 Hindi.
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 });
121
122 return hi;
123
124 })));