Merge "tiny optimization Title::isValidRedirectTarget()"
[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 (factory) {
6 if (typeof define === 'function' && define.amd) {
7 define(['moment'], factory); // AMD
8 } else if (typeof exports === 'object') {
9 module.exports = factory(require('../moment')); // Node
10 } else {
11 factory((typeof global !== 'undefined' ? global : this).moment); // node or other global
12 }
13 }(function (moment) {
14 var symbolMap = {
15 '1': '१',
16 '2': '२',
17 '3': '३',
18 '4': '४',
19 '5': '५',
20 '6': '६',
21 '7': '७',
22 '8': '८',
23 '9': '९',
24 '0': '०'
25 },
26 numberMap = {
27 '१': '1',
28 '२': '2',
29 '३': '3',
30 '४': '4',
31 '५': '5',
32 '६': '6',
33 '७': '7',
34 '८': '8',
35 '९': '9',
36 '०': '0'
37 };
38
39 return moment.defineLocale('hi', {
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, LT',
51 LLLL : 'dddd, D MMMM YYYY, LT'
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 meridiem : function (hour, minute, isLower) {
89 if (hour < 4) {
90 return 'रात';
91 } else if (hour < 10) {
92 return 'सुबह';
93 } else if (hour < 17) {
94 return 'दोपहर';
95 } else if (hour < 20) {
96 return 'शाम';
97 } else {
98 return 'रात';
99 }
100 },
101 week : {
102 dow : 0, // Sunday is the first day of the week.
103 doy : 6 // The week that contains Jan 1st is the first week of the year.
104 }
105 });
106 }));