2016-02-05 15:42:48 -05:00
|
|
|
//! moment.js locale configuration
|
2017-04-20 00:24:20 -04:00
|
|
|
//! locale : Hungarian [hu]
|
2016-02-05 15:42:48 -05:00
|
|
|
//! author : Adam Brunner : https://github.com/adambrunner
|
|
|
|
|
|
|
|
;(function (global, factory) {
|
|
|
|
typeof exports === 'object' && typeof module !== 'undefined'
|
|
|
|
&& typeof require === 'function' ? factory(require('../moment')) :
|
2017-04-20 00:24:20 -04:00
|
|
|
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
|
2016-02-05 15:42:48 -05:00
|
|
|
factory(global.moment)
|
2017-04-20 00:24:20 -04:00
|
|
|
}(this, (function (moment) { 'use strict';
|
2014-08-20 14:41:50 -04:00
|
|
|
|
|
|
|
|
2017-04-20 00:24:20 -04:00
|
|
|
var weekEndings = 'vasárnap hétfőn kedden szerdán csütörtökön pénteken szombaton'.split(' ');
|
|
|
|
function translate(number, withoutSuffix, key, isFuture) {
|
|
|
|
var num = number,
|
|
|
|
suffix;
|
|
|
|
switch (key) {
|
2014-08-20 14:41:50 -04:00
|
|
|
case 's':
|
|
|
|
return (isFuture || withoutSuffix) ? 'néhány másodperc' : 'néhány másodperce';
|
|
|
|
case 'm':
|
|
|
|
return 'egy' + (isFuture || withoutSuffix ? ' perc' : ' perce');
|
|
|
|
case 'mm':
|
|
|
|
return num + (isFuture || withoutSuffix ? ' perc' : ' perce');
|
|
|
|
case 'h':
|
|
|
|
return 'egy' + (isFuture || withoutSuffix ? ' óra' : ' órája');
|
|
|
|
case 'hh':
|
|
|
|
return num + (isFuture || withoutSuffix ? ' óra' : ' órája');
|
|
|
|
case 'd':
|
|
|
|
return 'egy' + (isFuture || withoutSuffix ? ' nap' : ' napja');
|
|
|
|
case 'dd':
|
|
|
|
return num + (isFuture || withoutSuffix ? ' nap' : ' napja');
|
|
|
|
case 'M':
|
|
|
|
return 'egy' + (isFuture || withoutSuffix ? ' hónap' : ' hónapja');
|
|
|
|
case 'MM':
|
|
|
|
return num + (isFuture || withoutSuffix ? ' hónap' : ' hónapja');
|
|
|
|
case 'y':
|
|
|
|
return 'egy' + (isFuture || withoutSuffix ? ' év' : ' éve');
|
|
|
|
case 'yy':
|
|
|
|
return num + (isFuture || withoutSuffix ? ' év' : ' éve');
|
|
|
|
}
|
2017-04-20 00:24:20 -04:00
|
|
|
return '';
|
|
|
|
}
|
|
|
|
function week(isFuture) {
|
|
|
|
return (isFuture ? '' : '[múlt] ') + '[' + weekEndings[this.day()] + '] LT[-kor]';
|
|
|
|
}
|
2014-08-20 14:41:50 -04:00
|
|
|
|
2017-04-20 00:24:20 -04:00
|
|
|
var hu = moment.defineLocale('hu', {
|
|
|
|
months : 'január_február_március_április_május_június_július_augusztus_szeptember_október_november_december'.split('_'),
|
|
|
|
monthsShort : 'jan_feb_márc_ápr_máj_jún_júl_aug_szept_okt_nov_dec'.split('_'),
|
|
|
|
weekdays : 'vasárnap_hétfő_kedd_szerda_csütörtök_péntek_szombat'.split('_'),
|
|
|
|
weekdaysShort : 'vas_hét_kedd_sze_csüt_pén_szo'.split('_'),
|
|
|
|
weekdaysMin : 'v_h_k_sze_cs_p_szo'.split('_'),
|
|
|
|
longDateFormat : {
|
|
|
|
LT : 'H:mm',
|
|
|
|
LTS : 'H:mm:ss',
|
|
|
|
L : 'YYYY.MM.DD.',
|
|
|
|
LL : 'YYYY. MMMM D.',
|
|
|
|
LLL : 'YYYY. MMMM D. H:mm',
|
|
|
|
LLLL : 'YYYY. MMMM D., dddd H:mm'
|
|
|
|
},
|
|
|
|
meridiemParse: /de|du/i,
|
|
|
|
isPM: function (input) {
|
|
|
|
return input.charAt(1).toLowerCase() === 'u';
|
|
|
|
},
|
|
|
|
meridiem : function (hours, minutes, isLower) {
|
|
|
|
if (hours < 12) {
|
|
|
|
return isLower === true ? 'de' : 'DE';
|
|
|
|
} else {
|
|
|
|
return isLower === true ? 'du' : 'DU';
|
|
|
|
}
|
|
|
|
},
|
|
|
|
calendar : {
|
|
|
|
sameDay : '[ma] LT[-kor]',
|
|
|
|
nextDay : '[holnap] LT[-kor]',
|
|
|
|
nextWeek : function () {
|
|
|
|
return week.call(this, true);
|
2014-08-20 14:41:50 -04:00
|
|
|
},
|
2017-04-20 00:24:20 -04:00
|
|
|
lastDay : '[tegnap] LT[-kor]',
|
|
|
|
lastWeek : function () {
|
|
|
|
return week.call(this, false);
|
2014-08-20 14:41:50 -04:00
|
|
|
},
|
2017-04-20 00:24:20 -04:00
|
|
|
sameElse : 'L'
|
|
|
|
},
|
|
|
|
relativeTime : {
|
|
|
|
future : '%s múlva',
|
|
|
|
past : '%s',
|
|
|
|
s : translate,
|
|
|
|
m : translate,
|
|
|
|
mm : translate,
|
|
|
|
h : translate,
|
|
|
|
hh : translate,
|
|
|
|
d : translate,
|
|
|
|
dd : translate,
|
|
|
|
M : translate,
|
|
|
|
MM : translate,
|
|
|
|
y : translate,
|
|
|
|
yy : translate
|
|
|
|
},
|
|
|
|
dayOfMonthOrdinalParse: /\d{1,2}\./,
|
|
|
|
ordinal : '%d.',
|
|
|
|
week : {
|
|
|
|
dow : 1, // Monday is the first day of the week.
|
|
|
|
doy : 4 // The week that contains Jan 4th is the first week of the year.
|
|
|
|
}
|
|
|
|
});
|
2016-02-05 15:42:48 -05:00
|
|
|
|
2017-04-20 00:24:20 -04:00
|
|
|
return hu;
|
2016-02-05 15:42:48 -05:00
|
|
|
|
2017-04-20 00:24:20 -04:00
|
|
|
})));
|