1 //! moment.js locale configuration
2 //! locale : hungarian (hu)
3 //! author : Adam Brunner : https://github.com/adambrunner
5 import moment from '../moment';
7 var weekEndings = 'vasárnap hétfőn kedden szerdán csütörtökön pénteken szombaton'.split(' ');
8 function translate(number, withoutSuffix, key, isFuture) {
13 return (isFuture || withoutSuffix) ? 'néhány másodperc' : 'néhány másodperce';
15 return 'egy' + (isFuture || withoutSuffix ? ' perc' : ' perce');
17 return num + (isFuture || withoutSuffix ? ' perc' : ' perce');
19 return 'egy' + (isFuture || withoutSuffix ? ' óra' : ' órája');
21 return num + (isFuture || withoutSuffix ? ' óra' : ' órája');
23 return 'egy' + (isFuture || withoutSuffix ? ' nap' : ' napja');
25 return num + (isFuture || withoutSuffix ? ' nap' : ' napja');
27 return 'egy' + (isFuture || withoutSuffix ? ' hónap' : ' hónapja');
29 return num + (isFuture || withoutSuffix ? ' hónap' : ' hónapja');
31 return 'egy' + (isFuture || withoutSuffix ? ' év' : ' éve');
33 return num + (isFuture || withoutSuffix ? ' év' : ' éve');
37 function week(isFuture) {
38 return (isFuture ? '' : '[múlt] ') + '[' + weekEndings[this.day()] + '] LT[-kor]';
41 export default moment.defineLocale('hu', {
42 months : 'január_február_március_április_május_június_július_augusztus_szeptember_október_november_december'.split('_'),
43 monthsShort : 'jan_feb_márc_ápr_máj_jún_júl_aug_szept_okt_nov_dec'.split('_'),
44 weekdays : 'vasárnap_hétfő_kedd_szerda_csütörtök_péntek_szombat'.split('_'),
45 weekdaysShort : 'vas_hét_kedd_sze_csüt_pén_szo'.split('_'),
46 weekdaysMin : 'v_h_k_sze_cs_p_szo'.split('_'),
52 LLL : 'YYYY. MMMM D. H:mm',
53 LLLL : 'YYYY. MMMM D., dddd H:mm'
55 meridiemParse: /de|du/i,
56 isPM: function (input) {
57 return input.charAt(1).toLowerCase() === 'u';
59 meridiem : function (hours, minutes, isLower) {
61 return isLower === true ? 'de' : 'DE';
63 return isLower === true ? 'du' : 'DU';
67 sameDay : '[ma] LT[-kor]',
68 nextDay : '[holnap] LT[-kor]',
69 nextWeek : function () {
70 return week.call(this, true);
72 lastDay : '[tegnap] LT[-kor]',
73 lastWeek : function () {
74 return week.call(this, false);
93 ordinalParse: /\d{1,2}\./,
96 dow : 1, // Monday is the first day of the week.
97 doy : 7 // The week that contains Jan 1st is the first week of the year.