Update Moment.js from 2.7.0 to 2.8.1
[lhc/web/wiklou.git] / resources / lib / moment / lang / 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(window.moment); // Browser 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 L : "DD/MM/YYYY",
48 LL : "D MMMM YYYY",
49 LLL : "D MMMM YYYY, LT",
50 LLLL : "dddd, D MMMM YYYY, LT"
51 },
52 calendar : {
53 sameDay : '[आज] LT',
54 nextDay : '[कल] LT',
55 nextWeek : 'dddd, LT',
56 lastDay : '[कल] LT',
57 lastWeek : '[पिछले] dddd, LT',
58 sameElse : 'L'
59 },
60 relativeTime : {
61 future : "%s में",
62 past : "%s पहले",
63 s : "कुछ ही क्षण",
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 meridiem : function (hour, minute, isLower) {
88 if (hour < 4) {
89 return "रात";
90 } else if (hour < 10) {
91 return "सुबह";
92 } else if (hour < 17) {
93 return "दोपहर";
94 } else if (hour < 20) {
95 return "शाम";
96 } else {
97 return "रात";
98 }
99 },
100 week : {
101 dow : 0, // Sunday is the first day of the week.
102 doy : 6 // The week that contains Jan 1st is the first week of the year.
103 }
104 });
105 }));