flosight-api/server/public/lib/moment/locale/hi.js
Jason Dreyzehner 2d1f504a3f Add 'server/' from commit 'eb7e5d10c97aafa302dfd4e7fd67a6bc2938c0a1'
git-subtree-dir: server
git-subtree-mainline: f35d7dd960
git-subtree-split: eb7e5d10c9
2017-08-10 17:08:14 -04:00

107 lines
3.9 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// moment.js locale configuration
// locale : hindi (hi)
// author : Mayank Singhal : https://github.com/mayanksinghal
(function (factory) {
if (typeof define === 'function' && define.amd) {
define(['moment'], factory); // AMD
} else if (typeof exports === 'object') {
module.exports = factory(require('../moment')); // Node
} else {
factory((typeof global !== 'undefined' ? global : this).moment); // node or other global
}
}(function (moment) {
var symbolMap = {
'1': '१',
'2': '',
'3': '',
'4': '',
'5': '',
'6': '',
'7': '',
'8': '',
'9': '',
'0': ''
},
numberMap = {
'': '1',
'': '2',
'': '3',
'': '4',
'': '5',
'': '6',
'': '7',
'': '8',
'': '9',
'': '0'
};
return moment.defineLocale('hi', {
months : 'जनवर_फरवर_म_अप_मई_ज_ज_अगस_सितमबर_अकबर_नवमबर_दिसमबर'.split('_'),
monthsShort : 'जन._फ._म_अप._मई_ज_ज._अग._सि._अक._नव._दि.'.split('_'),
weekdays : 'रवि_समव_मगलव_बधव_ग_शरव_शनि'.split('_'),
weekdaysShort : 'रवि_स_मगल_ब_ग_श_शनि'.split('_'),
weekdaysMin : '_स_म_ब_ग_श_श'.split('_'),
longDateFormat : {
LT : 'A h:mm बज',
LTS : 'A h:mm:ss बज',
L : 'DD/MM/YYYY',
LL : 'D MMMM YYYY',
LLL : 'D MMMM YYYY, LT',
LLLL : 'dddd, D MMMM YYYY, LT'
},
calendar : {
sameDay : '[आज] LT',
nextDay : '[कल] LT',
nextWeek : 'dddd, LT',
lastDay : '[कल] LT',
lastWeek : '[िछल] dddd, LT',
sameElse : 'L'
},
relativeTime : {
future : '%s ',
past : '%s पहल',
s : ' षण',
m : 'एक िनट',
mm : '%d िनट',
h : 'एक ',
hh : '%d ',
d : 'एक ि',
dd : '%d ि',
M : 'एक मह',
MM : '%d मह',
y : 'एक वर',
yy : '%d वर'
},
preparse: function (string) {
return string.replace(/[१२३४५६७८९०]/g, function (match) {
return numberMap[match];
});
},
postformat: function (string) {
return string.replace(/\d/g, function (match) {
return symbolMap[match];
});
},
// Hindi notation for meridiems are quite fuzzy in practice. While there exists
// a rigid notion of a 'Pahar' it is not used as rigidly in modern Hindi.
meridiem : function (hour, minute, isLower) {
if (hour < 4) {
return '';
} else if (hour < 10) {
return 'बह';
} else if (hour < 17) {
return 'पहर';
} else if (hour < 20) {
return '';
} else {
return '';
}
},
week : {
dow : 0, // Sunday is the first day of the week.
doy : 6 // The week that contains Jan 1st is the first week of the year.
}
});
}));