From: Tim Wood Date: Fri, 13 Jan 2012 16:54:26 +0000 (-0800) Subject: Adding Catalan (ca) locale X-Git-Tag: 1.4.0~32 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fea3266a1675f514bfcfc30b8f9a8415302f69cd;p=thirdparty%2Fmoment.git Adding Catalan (ca) locale #129 --- diff --git a/build.js b/build.js index 51c8e49eb..e16747d70 100755 --- a/build.js +++ b/build.js @@ -39,8 +39,8 @@ var JSHINT_CONFIG = { "strict": false, "white": true }; -var LANG_MINIFY = "de en-gb es gl eu fr it kr nb nl pl pt ru sv".split(" "); -var LANG_TEST = "de en en-gb es gl eu fr it kr nb nl pl pt ru sv".split(" "); +var LANG_MINIFY = "ca de en-gb es eu fr gl it kr nb nl pl pt ru sv".split(" "); +var LANG_TEST = "ca de en en-gb es eu fr gl it kr nb nl pl pt ru sv".split(" "); var LANG_PREFIX = "(function() { var moment; if (typeof window === 'undefined') { moment = require('../../moment'); module = QUnit.module; } else { moment = window.moment; }"; var LANG_SUFFIX = "})();"; var VERSION = '1.3.0'; diff --git a/lang/ca.js b/lang/ca.js new file mode 100644 index 000000000..9e648e69f --- /dev/null +++ b/lang/ca.js @@ -0,0 +1,66 @@ +(function () { + var lang = { + months : "Gener_Febrer_Març_Abril_Maig_Juny_Juliol_Agost_Setembre_Octubre_Novembre_Desembre".split("_"), + monthsShort : "Gen._Febr._Mar._Abr._Mai._Jun._Jul._Ag._Set._Oct._Nov._Des.".split("_"), + weekdays : "Diumenge_Dilluns_Dimarts_Dimecres_Dijous_Divendres_Dissabte".split("_"), + weekdaysShort : "Dg._Dl._Dt._Dc._Dj._Dv._Ds.".split("_"), + longDateFormat : { + LT : "H:mm", + L : "DD/MM/YYYY", + LL : "D MMMM YYYY", + LLL : "D MMMM YYYY LT", + LLLL : "dddd D MMMM YYYY LT" + }, + meridiem : { + AM : 'AM', + am : 'am', + PM : 'PM', + pm : 'pm' + }, + calendar : { + sameDay : function () { + return '[avui a ' + ((this.hours() !== 1) ? 'les' : 'la') + '] LT'; + }, + nextDay : function () { + return '[demá a ' + ((this.hours() !== 1) ? 'les' : 'la') + '] LT'; + }, + nextWeek : function () { + return 'dddd [a ' + ((this.hours() !== 1) ? 'les' : 'la') + '] LT'; + }, + lastDay : function () { + return '[ahir a ' + ((this.hours() !== 1) ? 'les' : 'la') + '] LT'; + }, + lastWeek : function () { + return '[el] dddd [passat a ' + ((this.hours() !== 1) ? 'les' : 'la') + '] LT'; + }, + sameElse : 'L' + }, + relativeTime : { + future : "en %s", + past : "fa %s", + s : "uns segons", + m : "un minut", + mm : "%d minuts", + h : "una hora", + hh : "%d hores", + d : "un dia", + dd : "%d dies", + M : "un mes", + MM : "%d mesos", + y : "un any", + yy : "%d anys" + }, + ordinal : function (number) { + return 'º'; + } + }; + + // Node + if (typeof module !== 'undefined') { + module.exports = lang; + } + // Browser + if (typeof window !== 'undefined' && this.moment && this.moment.lang) { + this.moment.lang('ca', lang); + } +}()); diff --git a/lang/min/all.min.js b/lang/min/all.min.js index ae16779e8..a8bcce90d 100644 --- a/lang/min/all.min.js +++ b/lang/min/all.min.js @@ -1 +1 @@ -(function(){var a={months:"Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Febr._Mrz._Apr._Mai_Jun._Jul._Aug._Sept._Okt._Nov._Dez.".split("_"),weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),longDateFormat:{LT:"H:mm U\\hr",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY LT",LLLL:"dddd, D. MMMM YYYY LT"},meridiem:{AM:"AM",am:"am",PM:"PM",pm:"pm"},calendar:{sameDay:"[Heute um] LT",sameElse:"L",nextDay:"[Morgen um] LT",nextWeek:"dddd [um] LT",lastDay:"[Gestern um] LT",lastWeek:"[letzten] dddd [um] LT"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",m:"einer Minute",mm:"%d Minuten",h:"einer Stunde",hh:"%d Stunden",d:"einem Tag",dd:"%d Tagen",M:"einem Monat",MM:"%d Monaten",y:"einem Jahr",yy:"%d Jahren"},ordinal:function(a){return"."}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("de",a)})(),function(){var a={months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),longDateFormat:{LT:"h:mm A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd, D MMMM YYYY LT"},meridiem:{AM:"AM",am:"am",PM:"PM",pm:"pm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},ordinal:function(a){var b=a%10;return~~(a%100/10)===1?"th":b===1?"st":b===2?"nd":b===3?"rd":"th"}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("en-gb",a)}(),function(){var a={months:"Enero_Febrero_Marzo_Abril_Mayo_Junio_Julio_Agosto_Septiembre_Octubre_Noviembre_Diciembre".split("_"),monthsShort:"Ene._Feb._Mar._Abr._May._Jun._Jul._Ago._Sep._Oct._Nov._Dic.".split("_"),weekdays:"Domingo_Lunes_Martes_Miércoles_Jueves_Viernes_Sábado".split("_"),weekdaysShort:"Dom._Lun._Mar._Mié._Jue._Vie._Sáb.".split("_"),longDateFormat:{LT:"H:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},meridiem:{AM:"AM",am:"am",PM:"PM",pm:"pm"},calendar:{sameDay:function(){return"[hoy a la"+(this.hours()!==1?"s":"")+"] LT"},nextDay:function(){return"[mañana a la"+(this.hours()!==1?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(this.hours()!==1?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(this.hours()!==1?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(this.hours()!==1?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},ordinal:function(a){return"º"}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("es",a)}(),function(){var a={months:"Xaneiro_Febreiro_Marzo_Abril_Maio_Xuño_Xullo_Agosto_Setembro_Octubro_Novembro_Decembro".split("_"),monthsShort:"Xan._Feb._Mar._Abr._Mai._Xuñ._Xul._Ago._Set._Out._Nov._Dec.".split("_"),weekdays:"Domingo_Luns_Martes_Mércores_Xoves_Venres_Sábado".split("_"),weekdaysShort:"Dom._Lun._Mar._Mér._Xov._Ven._Sáb.".split("_"),longDateFormat:{LT:"H:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},meridiem:{AM:"AM",am:"am",PM:"PM",pm:"pm"},calendar:{sameDay:function(){return"[hoxe "+(this.hours()!==1?"ás":"a")+"] LT"},nextDay:function(){return"[mañá "+(this.hours()!==1?"ás":"a")+"] LT"},nextWeek:function(){return"dddd ["+(this.hours()!==1?"ás":"a")+"] LT"},lastDay:function(){return"[onte "+(this.hours()!==1?"á":"a")+"] LT"},lastWeek:function(){return"[o] dddd [pasado "+(this.hours()!==1?"ás":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"fai %s",s:"uns segundo",m:"un minuto",mm:"%d minutos",h:"unha hora",hh:"%d horas",d:"un día",dd:"%d días",M:"un mes",MM:"%d meses",y:"un ano",yy:"%d anos"},ordinal:function(a){return"º"}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("gl",a)}(),function(){var a={months:"urtarrila_otsaila_martxoa_apirila_maiatza_ekaina_uztaila_abuztua_iraila_urria_azaroa_abendua".split("_"),monthsShort:"urt._ots._mar._api._mai._eka._uzt._abu._ira._urr._aza._abe.".split("_"),weekdays:"igandea_astelehena_asteartea_asteazkena_osteguna_ostirala_larunbata".split("_"),weekdaysShort:"ig._al._ar._az._og._ol._lr.".split("_"),longDateFormat:{LT:"HH:mm",L:"YYYY-MM-DD",LL:"YYYYko MMMMren D[a]",LLL:"YYYYko MMMMren D[a] LT",LLLL:"dddd, YYYYko MMMMren D[a] LT"},meridiem:{AM:"AM",am:"am",PM:"PM",pm:"pm"},calendar:{sameDay:"[gaur] LT[etan]",nextDay:"[bihar] LT[etan]",nextWeek:"dddd LT[etan]",lastDay:"[atzo] LT[etan]",lastWeek:"[aurreko] dddd LT[etan]",sameElse:"L"},relativeTime:{future:"%s barru",past:"duela %s",s:"segundo batzuk",m:"minutu bat",mm:"%d minutu",h:"ordu bat",hh:"%d ordu",d:"egun bat",dd:"%d egun",M:"hilabete bat",MM:"%d hilabete",y:"urte bat",yy:"%d urte"},ordinal:function(a){return"."}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("eu",a)}(),function(){var a={months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},meridiem:{AM:"AM",am:"am",PM:"PM",pm:"pm"},calendar:{sameDay:"[Ajourd'hui à] LT",nextDay:"[Demain à] LT",nextWeek:"dddd [à] LT",lastDay:"[Hier à] LT",lastWeek:"dddd [denier à] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"une année",yy:"%d années"},ordinal:function(a){return a===1?"er":"ème"}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("fr",a)}(),function(){var a={months:"Gennaio_Febbraio_Marzo_Aprile_Maggio_Giugno_Luglio_Agosto_Settebre_Ottobre_Novembre_Dicembre".split("_"),monthsShort:"Gen_Feb_Mar_Apr_Mag_Giu_Lug_Ago_Set_Ott_Nov_Dic".split("_"),weekdays:"Domenica_Lunedi_Martedi_Mercoledi_Giovedi_Venerdi_Sabato".split("_"),weekdaysShort:"Dom_Lun_Mar_Mer_Gio_Ven_Sab".split("_"),longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd, D MMMM YYYY LT"},meridiem:{AM:"AM",am:"am",PM:"PM",pm:"pm"},calendar:{sameDay:"[Oggi alle] LT",nextDay:"[Domani alle] LT",nextWeek:"dddd [alle] LT",lastDay:"[Ieri alle] LT",lastWeek:"[lo scorso] dddd [alle] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s fa",s:"secondi",m:"un minuto",mm:"%d minuti",h:"un ora",hh:"%d ore",d:"un giorno",dd:"%d giorni",M:"un mese",MM:"%d mesi",y:"un anno",yy:"%d anni"},ordinal:function(){return"º"}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("it",a)}(),function(){var a={months:"1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"),monthsShort:"1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"),weekdays:"일요일_월요일_화요일_수요일_목요일_금요일_토요일".split("_"),weekdaysShort:"일_월_화_수_목_금_토".split("_"),longDateFormat:{LT:"A h시 mm분",L:"YYYY.MM.DD",LL:"YYYY년 MMMM D일",LLL:"YYYY년 MMMM D일 LT",LLLL:"YYYY년 MMMM D일 dddd LT"},meridiem:{AM:"오전",am:"오전",PM:"오후",pm:"오후"},calendar:{sameDay:"오늘 LT",nextDay:"내일 LT",nextWeek:"dddd LT",lastDay:"어제 LT",lastWeek:"지난주 dddd LT",sameElse:"L"},relativeTime:{future:"%s 후",past:"%s 전",s:"몇초",ss:"%d초",m:"일분",mm:"%d분",h:"한시간",hh:"%d시간",d:"하루",dd:"%d일",M:"한달",MM:"%d달",y:"일년",yy:"%d년"},ordinal:function(a){return"일"}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("kr",a)}(),function(){var a={months:"januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des".split("_"),weekdays:"søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag".split("_"),weekdaysShort:"søn_man_tir_ons_tor_fre_lør".split("_"),longDateFormat:{LT:"HH:mm",L:"YYYY-MM-DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},meridiem:{AM:"AM",am:"am",PM:"PM",pm:"pm"},calendar:{sameDay:"[I dag klokken] LT",nextDay:"[I morgen klokken] LT",nextWeek:"dddd [klokken] LT",lastDay:"[I går klokken] LT",lastWeek:"[Forrige] dddd [klokken] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"for %s siden",s:"noen sekunder",m:"ett minutt",mm:"%d minutter",h:"en time",hh:"%d timer",d:"en dag",dd:"%d dager",M:"en måned",MM:"%d måneder",y:"ett år",yy:"%d år"},ordinal:function(a){return"."}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("nb",a)}(),function(){var a={months:"januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december".split("_"),monthsShort:"jan._feb._mar._apr._mei._jun._jul._aug._sep._okt._nov._dec.".split("_"),weekdays:"zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag".split("_"),weekdaysShort:"zo._ma._di._wo._do._vr._za.".split("_"),longDateFormat:{LT:"HH:mm",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},meridiem:{AM:"AM",am:"am",PM:"PM",pm:"pm"},calendar:{sameDay:"[Vandaag om] LT",nextDay:"[Morgen om] LT",nextWeek:"dddd [om] LT",lastDay:"[Gisteren om] LT",lastWeek:"[afgelopen] dddd [om] LT",sameElse:"L"},relativeTime:{future:"over %s",past:"%s geleden",s:"een paar seconden",m:"één minuut",mm:"%d minuten",h:"één uur",hh:"%d uur",d:"één dag",dd:"%d dagen",M:"één maand",MM:"%d maanden",y:"één jaar",yy:"%d jaar"},ordinal:function(a){return a===1||a===8||a>=20?"ste":"de"}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("nl",a)}(),function(){var a=function(a){return a%10<5&&a%10>1&&~~(a/10)!==1},b=function(b,c,d){var e=b+" ";switch(d){case"m":return c?"minuta":"minutę";case"mm":return e+(a(b)?"minuty":"minut");case"h":return c?"godzina":"godzinę";case"hh":return e+(a(b)?"godziny":"godzin");case"MM":return e+(a(b)?"miesiące":"miesięcy");case"yy":return e+(a(b)?"lata":"lat")}},c={months:"styczeń_luty_marzec_kwiecień_maj_czerwiec_lipiec_sierpień_wrzesień_październik_listopad_grudzień".split("_"),monthsShort:"sty_lut_mar_kwi_maj_cze_lip_sie_wrz_paź_lis_gru".split("_"),weekdays:"niedziela_poniedziałek_wtorek_środa_czwartek_piątek_sobota".split("_"),weekdaysShort:"nie_pon_wt_śr_czw_pt_sb".split("_"),longDateFormat:{LT:"HH:mm",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd, D MMMM YYYY LT"},meridiem:{AM:"AM",am:"am",PM:"PM",pm:"pm"},calendar:{sameDay:"[Dziś o] LT",nextDay:"[Jutro o] LT",nextWeek:"[W] dddd [o] LT",lastDay:"[Wczoraj o] LT",lastWeek:"[W zeszły/łą] dddd [o] LT",sameElse:"L"},relativeTime:{future:"za %s",past:"%s temu",s:"kilka sekund",m:b,mm:b,h:b,hh:b,d:"1 dzień",dd:"%d dni",M:"miesiąc",MM:b,y:"rok",yy:b},ordinal:function(a){return"."}};typeof module!="undefined"&&(module.exports=c),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("pl",c)}(),function(){var a={months:"Janeiro_Fevereiro_Março_Abril_Maio_Junho_Julho_Agosto_Setembro_Outubro_Novembro_Dezembro".split("_"),monthsShort:"Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez".split("_"),weekdays:"Domingo_Segunda-feira_Terça-feira_Quarta-feira_Quinta-feira_Sexta-feira_Sábado".split("_"),weekdaysShort:"Dom_Seg_Ter_Qua_Qui_Sex_Sáb".split("_"),longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D \\de MMMM \\de YYYY",LLL:"D \\de MMMM \\de YYYY LT",LLLL:"dddd, D \\de MMMM \\de YYYY LT"},meridiem:{AM:"AM",am:"am",PM:"PM",pm:"pm"},calendar:{sameDay:"[Hoje às] LT",nextDay:"[Amanhã às] LT",nextWeek:"dddd [às] LT",lastDay:"[Ontem às] LT",lastWeek:function(){return this.day()===0||this.day()===6?"[Último] dddd [às] LT":"[Última] dddd [às] LT"},sameElse:"L"},relativeTime:{future:"em %s",past:"%s atrás",s:"segundos",m:"um minuto",mm:"%d minutos",h:"uma hora",hh:"%d horas",d:"um dia",dd:"%d dias",M:"um mês",MM:"%d meses",y:"um ano",yy:"%d anos"},ordinal:function(a){return"º"}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("pt",a)}(),function(){var a={months:"январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь".split("_"),monthsShort:"янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек".split("_"),weekdays:"воскресенье_понедельник_вторник_среда_четверг_пятница_суббота".split("_"),weekdaysShort:"вск_пнд_втр_срд_чтв_птн_суб".split("_"),longDateFormat:{LT:"HH:mm",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd, D MMMM YYYY LT"},calendar:{sameDay:"[Сегодня в] LT",nextDay:"[Завтра в] LT",lastDay:"[Вчера в] LT",nextWeek:function(){return this.day()===1?"[Во] dddd [в] LT":"[В] dddd [в] LT"},lastWeek:function(){switch(this.day()){case 0:case 1:case 3:return"[В прошлый] dddd [в] LT";case 6:return"[В прошлое] dddd [в] LT";default:return"[В прошлую] dddd [в] LT"}},sameElse:"L"},relativeTime:{future:"через %s",past:"%s назад",s:"несколько секунд",m:"минут",mm:"%d минут",h:"часа",hh:"%d часов",d:"1 день",dd:"%d дней",M:"месяц",MM:"%d месяцев",y:"год",yy:"%d лет"},ordinal:function(a){return"."}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("ru",a)}(),function(){var a={months:"januari_februari_mars_april_maj_juni_juli_augusti_september_oktober_november_december".split("_"),monthsShort:"jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec".split("_"),weekdays:"söndag_måndag_tisdag_onsdag_torsdag_fredag_lördag".split("_"),weekdaysShort:"sön_mån_tis_ons_tor_fre_lör".split("_"),longDateFormat:{LT:"HH:mm",L:"YYYY-MM-DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},meridiem:{AM:"AM",am:"am",PM:"PM",pm:"pm"},calendar:{sameDay:"[Idag klockan] LT",nextDay:"[Imorgon klockan] LT",lastDay:"[Igår klockan] LT",nextWeek:"dddd [klockan] LT",lastWeek:"[Förra] dddd [en klockan] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"för %s sen",s:"några sekunder",m:"en minut",mm:"%d minuter",h:"en timme",hh:"%d timmar",d:"en dag",dd:"%d dagar",M:"en månad",MM:"%d månader",y:"ett år",yy:"%d år"},ordinal:function(a){var b=a%10;return~~(a%100/10)===1?"e":b===1?"a":b===2?"a":b===3?"e":"e"}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("sv",a)}() \ No newline at end of file +(function(){var a={months:"Gener_Febrer_Març_Abril_Maig_Juny_Juliol_Agost_Setembre_Octubre_Novembre_Desembre".split("_"),monthsShort:"Gen._Febr._Mar._Abr._Mai._Jun._Jul._Ag._Set._Oct._Nov._Des.".split("_"),weekdays:"Diumenge_Dilluns_Dimarts_Dimecres_Dijous_Divendres_Dissabte".split("_"),weekdaysShort:"Dg._Dl._Dt._Dc._Dj._Dv._Ds.".split("_"),longDateFormat:{LT:"H:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},meridiem:{AM:"AM",am:"am",PM:"PM",pm:"pm"},calendar:{sameDay:function(){return"[avui a "+(this.hours()!==1?"les":"la")+"] LT"},nextDay:function(){return"[demá a "+(this.hours()!==1?"les":"la")+"] LT"},nextWeek:function(){return"dddd [a "+(this.hours()!==1?"les":"la")+"] LT"},lastDay:function(){return"[ahir a "+(this.hours()!==1?"les":"la")+"] LT"},lastWeek:function(){return"[el] dddd [passat a "+(this.hours()!==1?"les":"la")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"fa %s",s:"uns segons",m:"un minut",mm:"%d minuts",h:"una hora",hh:"%d hores",d:"un dia",dd:"%d dies",M:"un mes",MM:"%d mesos",y:"un any",yy:"%d anys"},ordinal:function(a){return"º"}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("ca",a)})(),function(){var a={months:"Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Febr._Mrz._Apr._Mai_Jun._Jul._Aug._Sept._Okt._Nov._Dez.".split("_"),weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),longDateFormat:{LT:"H:mm U\\hr",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY LT",LLLL:"dddd, D. MMMM YYYY LT"},meridiem:{AM:"AM",am:"am",PM:"PM",pm:"pm"},calendar:{sameDay:"[Heute um] LT",sameElse:"L",nextDay:"[Morgen um] LT",nextWeek:"dddd [um] LT",lastDay:"[Gestern um] LT",lastWeek:"[letzten] dddd [um] LT"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",m:"einer Minute",mm:"%d Minuten",h:"einer Stunde",hh:"%d Stunden",d:"einem Tag",dd:"%d Tagen",M:"einem Monat",MM:"%d Monaten",y:"einem Jahr",yy:"%d Jahren"},ordinal:function(a){return"."}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("de",a)}(),function(){var a={months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),longDateFormat:{LT:"h:mm A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd, D MMMM YYYY LT"},meridiem:{AM:"AM",am:"am",PM:"PM",pm:"pm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},ordinal:function(a){var b=a%10;return~~(a%100/10)===1?"th":b===1?"st":b===2?"nd":b===3?"rd":"th"}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("en-gb",a)}(),function(){var a={months:"Enero_Febrero_Marzo_Abril_Mayo_Junio_Julio_Agosto_Septiembre_Octubre_Noviembre_Diciembre".split("_"),monthsShort:"Ene._Feb._Mar._Abr._May._Jun._Jul._Ago._Sep._Oct._Nov._Dic.".split("_"),weekdays:"Domingo_Lunes_Martes_Miércoles_Jueves_Viernes_Sábado".split("_"),weekdaysShort:"Dom._Lun._Mar._Mié._Jue._Vie._Sáb.".split("_"),longDateFormat:{LT:"H:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},meridiem:{AM:"AM",am:"am",PM:"PM",pm:"pm"},calendar:{sameDay:function(){return"[hoy a la"+(this.hours()!==1?"s":"")+"] LT"},nextDay:function(){return"[mañana a la"+(this.hours()!==1?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(this.hours()!==1?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(this.hours()!==1?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(this.hours()!==1?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},ordinal:function(a){return"º"}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("es",a)}(),function(){var a={months:"urtarrila_otsaila_martxoa_apirila_maiatza_ekaina_uztaila_abuztua_iraila_urria_azaroa_abendua".split("_"),monthsShort:"urt._ots._mar._api._mai._eka._uzt._abu._ira._urr._aza._abe.".split("_"),weekdays:"igandea_astelehena_asteartea_asteazkena_osteguna_ostirala_larunbata".split("_"),weekdaysShort:"ig._al._ar._az._og._ol._lr.".split("_"),longDateFormat:{LT:"HH:mm",L:"YYYY-MM-DD",LL:"YYYYko MMMMren D[a]",LLL:"YYYYko MMMMren D[a] LT",LLLL:"dddd, YYYYko MMMMren D[a] LT"},meridiem:{AM:"AM",am:"am",PM:"PM",pm:"pm"},calendar:{sameDay:"[gaur] LT[etan]",nextDay:"[bihar] LT[etan]",nextWeek:"dddd LT[etan]",lastDay:"[atzo] LT[etan]",lastWeek:"[aurreko] dddd LT[etan]",sameElse:"L"},relativeTime:{future:"%s barru",past:"duela %s",s:"segundo batzuk",m:"minutu bat",mm:"%d minutu",h:"ordu bat",hh:"%d ordu",d:"egun bat",dd:"%d egun",M:"hilabete bat",MM:"%d hilabete",y:"urte bat",yy:"%d urte"},ordinal:function(a){return"."}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("eu",a)}(),function(){var a={months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},meridiem:{AM:"AM",am:"am",PM:"PM",pm:"pm"},calendar:{sameDay:"[Ajourd'hui à] LT",nextDay:"[Demain à] LT",nextWeek:"dddd [à] LT",lastDay:"[Hier à] LT",lastWeek:"dddd [denier à] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"une année",yy:"%d années"},ordinal:function(a){return a===1?"er":"ème"}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("fr",a)}(),function(){var a={months:"Xaneiro_Febreiro_Marzo_Abril_Maio_Xuño_Xullo_Agosto_Setembro_Octubro_Novembro_Decembro".split("_"),monthsShort:"Xan._Feb._Mar._Abr._Mai._Xuñ._Xul._Ago._Set._Out._Nov._Dec.".split("_"),weekdays:"Domingo_Luns_Martes_Mércores_Xoves_Venres_Sábado".split("_"),weekdaysShort:"Dom._Lun._Mar._Mér._Xov._Ven._Sáb.".split("_"),longDateFormat:{LT:"H:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},meridiem:{AM:"AM",am:"am",PM:"PM",pm:"pm"},calendar:{sameDay:function(){return"[hoxe "+(this.hours()!==1?"ás":"a")+"] LT"},nextDay:function(){return"[mañá "+(this.hours()!==1?"ás":"a")+"] LT"},nextWeek:function(){return"dddd ["+(this.hours()!==1?"ás":"a")+"] LT"},lastDay:function(){return"[onte "+(this.hours()!==1?"á":"a")+"] LT"},lastWeek:function(){return"[o] dddd [pasado "+(this.hours()!==1?"ás":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"fai %s",s:"uns segundo",m:"un minuto",mm:"%d minutos",h:"unha hora",hh:"%d horas",d:"un día",dd:"%d días",M:"un mes",MM:"%d meses",y:"un ano",yy:"%d anos"},ordinal:function(a){return"º"}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("gl",a)}(),function(){var a={months:"Gennaio_Febbraio_Marzo_Aprile_Maggio_Giugno_Luglio_Agosto_Settebre_Ottobre_Novembre_Dicembre".split("_"),monthsShort:"Gen_Feb_Mar_Apr_Mag_Giu_Lug_Ago_Set_Ott_Nov_Dic".split("_"),weekdays:"Domenica_Lunedi_Martedi_Mercoledi_Giovedi_Venerdi_Sabato".split("_"),weekdaysShort:"Dom_Lun_Mar_Mer_Gio_Ven_Sab".split("_"),longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd, D MMMM YYYY LT"},meridiem:{AM:"AM",am:"am",PM:"PM",pm:"pm"},calendar:{sameDay:"[Oggi alle] LT",nextDay:"[Domani alle] LT",nextWeek:"dddd [alle] LT",lastDay:"[Ieri alle] LT",lastWeek:"[lo scorso] dddd [alle] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s fa",s:"secondi",m:"un minuto",mm:"%d minuti",h:"un ora",hh:"%d ore",d:"un giorno",dd:"%d giorni",M:"un mese",MM:"%d mesi",y:"un anno",yy:"%d anni"},ordinal:function(){return"º"}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("it",a)}(),function(){var a={months:"1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"),monthsShort:"1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"),weekdays:"일요일_월요일_화요일_수요일_목요일_금요일_토요일".split("_"),weekdaysShort:"일_월_화_수_목_금_토".split("_"),longDateFormat:{LT:"A h시 mm분",L:"YYYY.MM.DD",LL:"YYYY년 MMMM D일",LLL:"YYYY년 MMMM D일 LT",LLLL:"YYYY년 MMMM D일 dddd LT"},meridiem:{AM:"오전",am:"오전",PM:"오후",pm:"오후"},calendar:{sameDay:"오늘 LT",nextDay:"내일 LT",nextWeek:"dddd LT",lastDay:"어제 LT",lastWeek:"지난주 dddd LT",sameElse:"L"},relativeTime:{future:"%s 후",past:"%s 전",s:"몇초",ss:"%d초",m:"일분",mm:"%d분",h:"한시간",hh:"%d시간",d:"하루",dd:"%d일",M:"한달",MM:"%d달",y:"일년",yy:"%d년"},ordinal:function(a){return"일"}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("kr",a)}(),function(){var a={months:"januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des".split("_"),weekdays:"søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag".split("_"),weekdaysShort:"søn_man_tir_ons_tor_fre_lør".split("_"),longDateFormat:{LT:"HH:mm",L:"YYYY-MM-DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},meridiem:{AM:"AM",am:"am",PM:"PM",pm:"pm"},calendar:{sameDay:"[I dag klokken] LT",nextDay:"[I morgen klokken] LT",nextWeek:"dddd [klokken] LT",lastDay:"[I går klokken] LT",lastWeek:"[Forrige] dddd [klokken] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"for %s siden",s:"noen sekunder",m:"ett minutt",mm:"%d minutter",h:"en time",hh:"%d timer",d:"en dag",dd:"%d dager",M:"en måned",MM:"%d måneder",y:"ett år",yy:"%d år"},ordinal:function(a){return"."}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("nb",a)}(),function(){var a={months:"januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december".split("_"),monthsShort:"jan._feb._mar._apr._mei._jun._jul._aug._sep._okt._nov._dec.".split("_"),weekdays:"zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag".split("_"),weekdaysShort:"zo._ma._di._wo._do._vr._za.".split("_"),longDateFormat:{LT:"HH:mm",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},meridiem:{AM:"AM",am:"am",PM:"PM",pm:"pm"},calendar:{sameDay:"[Vandaag om] LT",nextDay:"[Morgen om] LT",nextWeek:"dddd [om] LT",lastDay:"[Gisteren om] LT",lastWeek:"[afgelopen] dddd [om] LT",sameElse:"L"},relativeTime:{future:"over %s",past:"%s geleden",s:"een paar seconden",m:"één minuut",mm:"%d minuten",h:"één uur",hh:"%d uur",d:"één dag",dd:"%d dagen",M:"één maand",MM:"%d maanden",y:"één jaar",yy:"%d jaar"},ordinal:function(a){return a===1||a===8||a>=20?"ste":"de"}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("nl",a)}(),function(){var a=function(a){return a%10<5&&a%10>1&&~~(a/10)!==1},b=function(b,c,d){var e=b+" ";switch(d){case"m":return c?"minuta":"minutę";case"mm":return e+(a(b)?"minuty":"minut");case"h":return c?"godzina":"godzinę";case"hh":return e+(a(b)?"godziny":"godzin");case"MM":return e+(a(b)?"miesiące":"miesięcy");case"yy":return e+(a(b)?"lata":"lat")}},c={months:"styczeń_luty_marzec_kwiecień_maj_czerwiec_lipiec_sierpień_wrzesień_październik_listopad_grudzień".split("_"),monthsShort:"sty_lut_mar_kwi_maj_cze_lip_sie_wrz_paź_lis_gru".split("_"),weekdays:"niedziela_poniedziałek_wtorek_środa_czwartek_piątek_sobota".split("_"),weekdaysShort:"nie_pon_wt_śr_czw_pt_sb".split("_"),longDateFormat:{LT:"HH:mm",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd, D MMMM YYYY LT"},meridiem:{AM:"AM",am:"am",PM:"PM",pm:"pm"},calendar:{sameDay:"[Dziś o] LT",nextDay:"[Jutro o] LT",nextWeek:"[W] dddd [o] LT",lastDay:"[Wczoraj o] LT",lastWeek:"[W zeszły/łą] dddd [o] LT",sameElse:"L"},relativeTime:{future:"za %s",past:"%s temu",s:"kilka sekund",m:b,mm:b,h:b,hh:b,d:"1 dzień",dd:"%d dni",M:"miesiąc",MM:b,y:"rok",yy:b},ordinal:function(a){return"."}};typeof module!="undefined"&&(module.exports=c),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("pl",c)}(),function(){var a={months:"Janeiro_Fevereiro_Março_Abril_Maio_Junho_Julho_Agosto_Setembro_Outubro_Novembro_Dezembro".split("_"),monthsShort:"Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez".split("_"),weekdays:"Domingo_Segunda-feira_Terça-feira_Quarta-feira_Quinta-feira_Sexta-feira_Sábado".split("_"),weekdaysShort:"Dom_Seg_Ter_Qua_Qui_Sex_Sáb".split("_"),longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D \\de MMMM \\de YYYY",LLL:"D \\de MMMM \\de YYYY LT",LLLL:"dddd, D \\de MMMM \\de YYYY LT"},meridiem:{AM:"AM",am:"am",PM:"PM",pm:"pm"},calendar:{sameDay:"[Hoje às] LT",nextDay:"[Amanhã às] LT",nextWeek:"dddd [às] LT",lastDay:"[Ontem às] LT",lastWeek:function(){return this.day()===0||this.day()===6?"[Último] dddd [às] LT":"[Última] dddd [às] LT"},sameElse:"L"},relativeTime:{future:"em %s",past:"%s atrás",s:"segundos",m:"um minuto",mm:"%d minutos",h:"uma hora",hh:"%d horas",d:"um dia",dd:"%d dias",M:"um mês",MM:"%d meses",y:"um ano",yy:"%d anos"},ordinal:function(a){return"º"}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("pt",a)}(),function(){var a={months:"январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь".split("_"),monthsShort:"янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек".split("_"),weekdays:"воскресенье_понедельник_вторник_среда_четверг_пятница_суббота".split("_"),weekdaysShort:"вск_пнд_втр_срд_чтв_птн_суб".split("_"),longDateFormat:{LT:"HH:mm",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd, D MMMM YYYY LT"},calendar:{sameDay:"[Сегодня в] LT",nextDay:"[Завтра в] LT",lastDay:"[Вчера в] LT",nextWeek:function(){return this.day()===1?"[Во] dddd [в] LT":"[В] dddd [в] LT"},lastWeek:function(){switch(this.day()){case 0:case 1:case 3:return"[В прошлый] dddd [в] LT";case 6:return"[В прошлое] dddd [в] LT";default:return"[В прошлую] dddd [в] LT"}},sameElse:"L"},relativeTime:{future:"через %s",past:"%s назад",s:"несколько секунд",m:"минут",mm:"%d минут",h:"часа",hh:"%d часов",d:"1 день",dd:"%d дней",M:"месяц",MM:"%d месяцев",y:"год",yy:"%d лет"},ordinal:function(a){return"."}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("ru",a)}(),function(){var a={months:"januari_februari_mars_april_maj_juni_juli_augusti_september_oktober_november_december".split("_"),monthsShort:"jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec".split("_"),weekdays:"söndag_måndag_tisdag_onsdag_torsdag_fredag_lördag".split("_"),weekdaysShort:"sön_mån_tis_ons_tor_fre_lör".split("_"),longDateFormat:{LT:"HH:mm",L:"YYYY-MM-DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},meridiem:{AM:"AM",am:"am",PM:"PM",pm:"pm"},calendar:{sameDay:"[Idag klockan] LT",nextDay:"[Imorgon klockan] LT",lastDay:"[Igår klockan] LT",nextWeek:"dddd [klockan] LT",lastWeek:"[Förra] dddd [en klockan] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"för %s sen",s:"några sekunder",m:"en minut",mm:"%d minuter",h:"en timme",hh:"%d timmar",d:"en dag",dd:"%d dagar",M:"en månad",MM:"%d månader",y:"ett år",yy:"%d år"},ordinal:function(a){var b=a%10;return~~(a%100/10)===1?"e":b===1?"a":b===2?"a":b===3?"e":"e"}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("sv",a)}() \ No newline at end of file diff --git a/lang/min/ca.min.js b/lang/min/ca.min.js new file mode 100644 index 000000000..805926a45 --- /dev/null +++ b/lang/min/ca.min.js @@ -0,0 +1 @@ +(function(){var a={months:"Gener_Febrer_Març_Abril_Maig_Juny_Juliol_Agost_Setembre_Octubre_Novembre_Desembre".split("_"),monthsShort:"Gen._Febr._Mar._Abr._Mai._Jun._Jul._Ag._Set._Oct._Nov._Des.".split("_"),weekdays:"Diumenge_Dilluns_Dimarts_Dimecres_Dijous_Divendres_Dissabte".split("_"),weekdaysShort:"Dg._Dl._Dt._Dc._Dj._Dv._Ds.".split("_"),longDateFormat:{LT:"H:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},meridiem:{AM:"AM",am:"am",PM:"PM",pm:"pm"},calendar:{sameDay:function(){return"[avui a "+(this.hours()!==1?"les":"la")+"] LT"},nextDay:function(){return"[demá a "+(this.hours()!==1?"les":"la")+"] LT"},nextWeek:function(){return"dddd [a "+(this.hours()!==1?"les":"la")+"] LT"},lastDay:function(){return"[ahir a "+(this.hours()!==1?"les":"la")+"] LT"},lastWeek:function(){return"[el] dddd [passat a "+(this.hours()!==1?"les":"la")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"fa %s",s:"uns segons",m:"un minut",mm:"%d minuts",h:"una hora",hh:"%d hores",d:"un dia",dd:"%d dies",M:"un mes",MM:"%d mesos",y:"un any",yy:"%d anys"},ordinal:function(a){return"º"}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("ca",a)})() \ No newline at end of file diff --git a/lang/test/ca.js b/lang/test/ca.js new file mode 100644 index 000000000..71a58e1bd --- /dev/null +++ b/lang/test/ca.js @@ -0,0 +1,198 @@ + +/************************************************** + Català + *************************************************/ + +module("lang:ca"); + +test("parse", 96, function() { + moment.lang('ca'); + + var tests = "Gener Gen._Febrer Febr._Març Mar._Abril Abr._Maig Mai._Juny Jun._Juliol Jul._Agost Ag._Setembre Set._Octubre Oct._Novembre Nov._Desembre Des.".split("_"); + + var i; + function equalTest(input, mmm, i) { + equal(moment(input, mmm).month(), i, input + ' should be month ' + (i + 1)); + } + for (i = 0; i < 12; i++) { + tests[i] = tests[i].split(' '); + equalTest(tests[i][0], 'MMM', i); + equalTest(tests[i][1], 'MMM', i); + equalTest(tests[i][0], 'MMMM', i); + equalTest(tests[i][1], 'MMMM', i); + equalTest(tests[i][0].toLocaleLowerCase(), 'MMMM', i); + equalTest(tests[i][1].toLocaleLowerCase(), 'MMMM', i); + equalTest(tests[i][0].toLocaleUpperCase(), 'MMMM', i); + equalTest(tests[i][1].toLocaleUpperCase(), 'MMMM', i); + } +}); + +test("format ordinal", 31, function() { + moment.lang('ca'); + equal(moment([2011, 0, 1]).format('DDDo'), '1º', '1º'); + equal(moment([2011, 0, 2]).format('DDDo'), '2º', '2º'); + equal(moment([2011, 0, 3]).format('DDDo'), '3º', '3º'); + equal(moment([2011, 0, 4]).format('DDDo'), '4º', '4º'); + equal(moment([2011, 0, 5]).format('DDDo'), '5º', '5º'); + equal(moment([2011, 0, 6]).format('DDDo'), '6º', '6º'); + equal(moment([2011, 0, 7]).format('DDDo'), '7º', '7º'); + equal(moment([2011, 0, 8]).format('DDDo'), '8º', '8º'); + equal(moment([2011, 0, 9]).format('DDDo'), '9º', '9º'); + equal(moment([2011, 0, 10]).format('DDDo'), '10º', '10º'); + + equal(moment([2011, 0, 11]).format('DDDo'), '11º', '11º'); + equal(moment([2011, 0, 12]).format('DDDo'), '12º', '12º'); + equal(moment([2011, 0, 13]).format('DDDo'), '13º', '13º'); + equal(moment([2011, 0, 14]).format('DDDo'), '14º', '14º'); + equal(moment([2011, 0, 15]).format('DDDo'), '15º', '15º'); + equal(moment([2011, 0, 16]).format('DDDo'), '16º', '16º'); + equal(moment([2011, 0, 17]).format('DDDo'), '17º', '17º'); + equal(moment([2011, 0, 18]).format('DDDo'), '18º', '18º'); + equal(moment([2011, 0, 19]).format('DDDo'), '19º', '19º'); + equal(moment([2011, 0, 20]).format('DDDo'), '20º', '20º'); + + equal(moment([2011, 0, 21]).format('DDDo'), '21º', '21º'); + equal(moment([2011, 0, 22]).format('DDDo'), '22º', '22º'); + equal(moment([2011, 0, 23]).format('DDDo'), '23º', '23º'); + equal(moment([2011, 0, 24]).format('DDDo'), '24º', '24º'); + equal(moment([2011, 0, 25]).format('DDDo'), '25º', '25º'); + equal(moment([2011, 0, 26]).format('DDDo'), '26º', '26º'); + equal(moment([2011, 0, 27]).format('DDDo'), '27º', '27º'); + equal(moment([2011, 0, 28]).format('DDDo'), '28º', '28º'); + equal(moment([2011, 0, 29]).format('DDDo'), '29º', '29º'); + equal(moment([2011, 0, 30]).format('DDDo'), '30º', '30º'); + + equal(moment([2011, 0, 31]).format('DDDo'), '31º', '31º'); +}); + +test("format month", 12, function() { + moment.lang('ca'); + var expected = "Gener Gen._Febrer Febr._Març Mar._Abril Abr._Maig Mai._Juny Jun._Juliol Jul._Agost Ag._Setembre Set._Octubre Oct._Novembre Nov._Desembre Des.".split("_"); + var i; + for (i = 0; i < expected.length; i++) { + equal(moment([2011, i, 0]).format('MMMM MMM'), expected[i], expected[i]); + } +}); + +test("format week", 7, function() { + moment.lang('ca'); + var expected = "Diumenge Dg._Dilluns Dl._Dimarts Dt._Dimecres Dc._Dijous Dj._Divendres Dv._Dissabte Ds.".split("_"); + + var i; + for (i = 0; i < expected.length; i++) { + equal(moment([2011, 0, 2 + i]).format('dddd ddd'), expected[i], expected[i]); + } +}); + +test("from", 30, function() { + moment.lang('ca'); + var start = moment([2007, 1, 28]); + equal(start.from(moment([2007, 1, 28]).add({s:44}), true), "uns segons", "44 seconds = a few seconds"); + equal(start.from(moment([2007, 1, 28]).add({s:45}), true), "un minut", "45 seconds = a minute"); + equal(start.from(moment([2007, 1, 28]).add({s:89}), true), "un minut", "89 seconds = a minute"); + equal(start.from(moment([2007, 1, 28]).add({s:90}), true), "2 minuts", "90 seconds = 2 minutes"); + equal(start.from(moment([2007, 1, 28]).add({m:44}), true), "44 minuts", "44 minutes = 44 minutes"); + equal(start.from(moment([2007, 1, 28]).add({m:45}), true), "una hora", "45 minutes = an hour"); + equal(start.from(moment([2007, 1, 28]).add({m:89}), true), "una hora", "89 minutes = an hour"); + equal(start.from(moment([2007, 1, 28]).add({m:90}), true), "2 hores", "90 minutes = 2 hours"); + equal(start.from(moment([2007, 1, 28]).add({h:5}), true), "5 hores", "5 hours = 5 hours"); + equal(start.from(moment([2007, 1, 28]).add({h:21}), true), "21 hores", "21 hours = 21 hours"); + equal(start.from(moment([2007, 1, 28]).add({h:22}), true), "un dia", "22 hours = a day"); + equal(start.from(moment([2007, 1, 28]).add({h:35}), true), "un dia", "35 hours = a day"); + equal(start.from(moment([2007, 1, 28]).add({h:36}), true), "2 dies", "36 hours = 2 days"); + equal(start.from(moment([2007, 1, 28]).add({d:1}), true), "un dia", "1 day = a day"); + equal(start.from(moment([2007, 1, 28]).add({d:5}), true), "5 dies", "5 days = 5 days"); + equal(start.from(moment([2007, 1, 28]).add({d:25}), true), "25 dies", "25 days = 25 days"); + equal(start.from(moment([2007, 1, 28]).add({d:26}), true), "un mes", "26 days = a month"); + equal(start.from(moment([2007, 1, 28]).add({d:30}), true), "un mes", "30 days = a month"); + equal(start.from(moment([2007, 1, 28]).add({d:45}), true), "un mes", "45 days = a month"); + equal(start.from(moment([2007, 1, 28]).add({d:46}), true), "2 mesos", "46 days = 2 months"); + equal(start.from(moment([2007, 1, 28]).add({d:74}), true), "2 mesos", "75 days = 2 months"); + equal(start.from(moment([2007, 1, 28]).add({d:76}), true), "3 mesos", "76 days = 3 months"); + equal(start.from(moment([2007, 1, 28]).add({M:1}), true), "un mes", "1 month = a month"); + equal(start.from(moment([2007, 1, 28]).add({M:5}), true), "5 mesos", "5 months = 5 months"); + equal(start.from(moment([2007, 1, 28]).add({d:344}), true), "11 mesos", "344 days = 11 months"); + equal(start.from(moment([2007, 1, 28]).add({d:345}), true), "un any", "345 days = a year"); + equal(start.from(moment([2007, 1, 28]).add({d:547}), true), "un any", "547 days = a year"); + equal(start.from(moment([2007, 1, 28]).add({d:548}), true), "2 anys", "548 days = 2 years"); + equal(start.from(moment([2007, 1, 28]).add({y:1}), true), "un any", "1 year = a year"); + equal(start.from(moment([2007, 1, 28]).add({y:5}), true), "5 anys", "5 years = 5 years"); +}); + +test("suffix", 2, function() { + moment.lang('ca'); + equal(moment(30000).from(0), "en uns segons", "prefix"); + equal(moment(0).from(30000), "fa uns segons", "suffix"); +}); + + +test("now from now", 1, function() { + moment.lang('ca'); + equal(moment().fromNow(), "fa uns segons", "now from now should display as in the past"); +}); + + +test("fromNow", 2, function() { + moment.lang('ca'); + equal(moment().add({s:30}).fromNow(), "en uns segons", "en uns segons"); + equal(moment().add({d:5}).fromNow(), "en 5 dies", "en 5 dies"); +}); + + +test("calendar day", 7, function() { + moment.lang('ca'); + + var a = moment().hours(2).minutes(0).seconds(0); + + equal(moment(a).calendar(), "avui a les 2:00", "today at the same time"); + equal(moment(a).add({ m: 25 }).calendar(), "avui a les 2:25", "Now plus 25 min"); + equal(moment(a).add({ h: 1 }).calendar(), "avui a les 3:00", "Now plus 1 hour"); + equal(moment(a).add({ d: 1 }).calendar(), "demá a les 2:00", "tomorrow at the same time"); + equal(moment(a).add({ d: 1, h : -1 }).calendar(), "demá a la 1:00", "tomorrow minus 1 hour"); + equal(moment(a).subtract({ h: 1 }).calendar(), "avui a la 1:00", "Now minus 1 hour"); + equal(moment(a).subtract({ d: 1 }).calendar(), "ahir a les 2:00", "yesterday at the same time"); +}); + +test("calendar next week", 15, function() { + moment.lang('ca'); + + var i; + var m; + + for (i = 2; i < 7; i++) { + m = moment().add({ d: i }); + equal(m.calendar(), m.format('dddd [a ' + ((m.hours() !== 1) ? 'les' : 'la') + '] LT'), "Today + " + i + " days current time"); + m.hours(0).minutes(0).seconds(0).milliseconds(0); + equal(m.calendar(), m.format('dddd [a ' + ((m.hours() !== 1) ? 'les' : 'la') + '] LT'), "Today + " + i + " days beginning of day"); + m.hours(23).minutes(59).seconds(59).milliseconds(999); + equal(m.calendar(), m.format('dddd [a ' + ((m.hours() !== 1) ? 'les' : 'la') + '] LT'), "Today + " + i + " days end of day"); + } +}); + +test("calendar last week", 15, function() { + moment.lang('ca'); + + for (i = 2; i < 7; i++) { + m = moment().subtract({ d: i }); + equal(m.calendar(), m.format('[el] dddd [passat a ' + ((m.hours() !== 1) ? 'les' : 'la') + '] LT'), "Today - " + i + " days current time"); + m.hours(0).minutes(0).seconds(0).milliseconds(0); + equal(m.calendar(), m.format('[el] dddd [passat a ' + ((m.hours() !== 1) ? 'les' : 'la') + '] LT'), "Today - " + i + " days beginning of day"); + m.hours(23).minutes(59).seconds(59).milliseconds(999); + equal(m.calendar(), m.format('[el] dddd [passat a ' + ((m.hours() !== 1) ? 'les' : 'la') + '] LT'), "Today - " + i + " days end of day"); + } +}); + +test("calendar all else", 4, function() { + moment.lang('ca'); + var weeksAgo = moment().subtract({ w: 1 }); + var weeksFromNow = moment().add({ w: 1 }); + + equal(weeksAgo.calendar(), weeksAgo.format('L'), "1 week ago"); + equal(weeksFromNow.calendar(), weeksFromNow.format('L'), "in 1 week"); + + weeksAgo = moment().subtract({ w: 2 }); + weeksFromNow = moment().add({ w: 2 }); + + equal(weeksAgo.calendar(), weeksAgo.format('L'), "2 weeks ago"); + equal(weeksFromNow.calendar(), weeksFromNow.format('L'), "in 2 weeks"); +}); diff --git a/site/js/lang-all.min.js b/site/js/lang-all.min.js index ae16779e8..a8bcce90d 100644 --- a/site/js/lang-all.min.js +++ b/site/js/lang-all.min.js @@ -1 +1 @@ -(function(){var a={months:"Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Febr._Mrz._Apr._Mai_Jun._Jul._Aug._Sept._Okt._Nov._Dez.".split("_"),weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),longDateFormat:{LT:"H:mm U\\hr",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY LT",LLLL:"dddd, D. MMMM YYYY LT"},meridiem:{AM:"AM",am:"am",PM:"PM",pm:"pm"},calendar:{sameDay:"[Heute um] LT",sameElse:"L",nextDay:"[Morgen um] LT",nextWeek:"dddd [um] LT",lastDay:"[Gestern um] LT",lastWeek:"[letzten] dddd [um] LT"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",m:"einer Minute",mm:"%d Minuten",h:"einer Stunde",hh:"%d Stunden",d:"einem Tag",dd:"%d Tagen",M:"einem Monat",MM:"%d Monaten",y:"einem Jahr",yy:"%d Jahren"},ordinal:function(a){return"."}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("de",a)})(),function(){var a={months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),longDateFormat:{LT:"h:mm A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd, D MMMM YYYY LT"},meridiem:{AM:"AM",am:"am",PM:"PM",pm:"pm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},ordinal:function(a){var b=a%10;return~~(a%100/10)===1?"th":b===1?"st":b===2?"nd":b===3?"rd":"th"}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("en-gb",a)}(),function(){var a={months:"Enero_Febrero_Marzo_Abril_Mayo_Junio_Julio_Agosto_Septiembre_Octubre_Noviembre_Diciembre".split("_"),monthsShort:"Ene._Feb._Mar._Abr._May._Jun._Jul._Ago._Sep._Oct._Nov._Dic.".split("_"),weekdays:"Domingo_Lunes_Martes_Miércoles_Jueves_Viernes_Sábado".split("_"),weekdaysShort:"Dom._Lun._Mar._Mié._Jue._Vie._Sáb.".split("_"),longDateFormat:{LT:"H:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},meridiem:{AM:"AM",am:"am",PM:"PM",pm:"pm"},calendar:{sameDay:function(){return"[hoy a la"+(this.hours()!==1?"s":"")+"] LT"},nextDay:function(){return"[mañana a la"+(this.hours()!==1?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(this.hours()!==1?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(this.hours()!==1?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(this.hours()!==1?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},ordinal:function(a){return"º"}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("es",a)}(),function(){var a={months:"Xaneiro_Febreiro_Marzo_Abril_Maio_Xuño_Xullo_Agosto_Setembro_Octubro_Novembro_Decembro".split("_"),monthsShort:"Xan._Feb._Mar._Abr._Mai._Xuñ._Xul._Ago._Set._Out._Nov._Dec.".split("_"),weekdays:"Domingo_Luns_Martes_Mércores_Xoves_Venres_Sábado".split("_"),weekdaysShort:"Dom._Lun._Mar._Mér._Xov._Ven._Sáb.".split("_"),longDateFormat:{LT:"H:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},meridiem:{AM:"AM",am:"am",PM:"PM",pm:"pm"},calendar:{sameDay:function(){return"[hoxe "+(this.hours()!==1?"ás":"a")+"] LT"},nextDay:function(){return"[mañá "+(this.hours()!==1?"ás":"a")+"] LT"},nextWeek:function(){return"dddd ["+(this.hours()!==1?"ás":"a")+"] LT"},lastDay:function(){return"[onte "+(this.hours()!==1?"á":"a")+"] LT"},lastWeek:function(){return"[o] dddd [pasado "+(this.hours()!==1?"ás":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"fai %s",s:"uns segundo",m:"un minuto",mm:"%d minutos",h:"unha hora",hh:"%d horas",d:"un día",dd:"%d días",M:"un mes",MM:"%d meses",y:"un ano",yy:"%d anos"},ordinal:function(a){return"º"}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("gl",a)}(),function(){var a={months:"urtarrila_otsaila_martxoa_apirila_maiatza_ekaina_uztaila_abuztua_iraila_urria_azaroa_abendua".split("_"),monthsShort:"urt._ots._mar._api._mai._eka._uzt._abu._ira._urr._aza._abe.".split("_"),weekdays:"igandea_astelehena_asteartea_asteazkena_osteguna_ostirala_larunbata".split("_"),weekdaysShort:"ig._al._ar._az._og._ol._lr.".split("_"),longDateFormat:{LT:"HH:mm",L:"YYYY-MM-DD",LL:"YYYYko MMMMren D[a]",LLL:"YYYYko MMMMren D[a] LT",LLLL:"dddd, YYYYko MMMMren D[a] LT"},meridiem:{AM:"AM",am:"am",PM:"PM",pm:"pm"},calendar:{sameDay:"[gaur] LT[etan]",nextDay:"[bihar] LT[etan]",nextWeek:"dddd LT[etan]",lastDay:"[atzo] LT[etan]",lastWeek:"[aurreko] dddd LT[etan]",sameElse:"L"},relativeTime:{future:"%s barru",past:"duela %s",s:"segundo batzuk",m:"minutu bat",mm:"%d minutu",h:"ordu bat",hh:"%d ordu",d:"egun bat",dd:"%d egun",M:"hilabete bat",MM:"%d hilabete",y:"urte bat",yy:"%d urte"},ordinal:function(a){return"."}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("eu",a)}(),function(){var a={months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},meridiem:{AM:"AM",am:"am",PM:"PM",pm:"pm"},calendar:{sameDay:"[Ajourd'hui à] LT",nextDay:"[Demain à] LT",nextWeek:"dddd [à] LT",lastDay:"[Hier à] LT",lastWeek:"dddd [denier à] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"une année",yy:"%d années"},ordinal:function(a){return a===1?"er":"ème"}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("fr",a)}(),function(){var a={months:"Gennaio_Febbraio_Marzo_Aprile_Maggio_Giugno_Luglio_Agosto_Settebre_Ottobre_Novembre_Dicembre".split("_"),monthsShort:"Gen_Feb_Mar_Apr_Mag_Giu_Lug_Ago_Set_Ott_Nov_Dic".split("_"),weekdays:"Domenica_Lunedi_Martedi_Mercoledi_Giovedi_Venerdi_Sabato".split("_"),weekdaysShort:"Dom_Lun_Mar_Mer_Gio_Ven_Sab".split("_"),longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd, D MMMM YYYY LT"},meridiem:{AM:"AM",am:"am",PM:"PM",pm:"pm"},calendar:{sameDay:"[Oggi alle] LT",nextDay:"[Domani alle] LT",nextWeek:"dddd [alle] LT",lastDay:"[Ieri alle] LT",lastWeek:"[lo scorso] dddd [alle] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s fa",s:"secondi",m:"un minuto",mm:"%d minuti",h:"un ora",hh:"%d ore",d:"un giorno",dd:"%d giorni",M:"un mese",MM:"%d mesi",y:"un anno",yy:"%d anni"},ordinal:function(){return"º"}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("it",a)}(),function(){var a={months:"1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"),monthsShort:"1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"),weekdays:"일요일_월요일_화요일_수요일_목요일_금요일_토요일".split("_"),weekdaysShort:"일_월_화_수_목_금_토".split("_"),longDateFormat:{LT:"A h시 mm분",L:"YYYY.MM.DD",LL:"YYYY년 MMMM D일",LLL:"YYYY년 MMMM D일 LT",LLLL:"YYYY년 MMMM D일 dddd LT"},meridiem:{AM:"오전",am:"오전",PM:"오후",pm:"오후"},calendar:{sameDay:"오늘 LT",nextDay:"내일 LT",nextWeek:"dddd LT",lastDay:"어제 LT",lastWeek:"지난주 dddd LT",sameElse:"L"},relativeTime:{future:"%s 후",past:"%s 전",s:"몇초",ss:"%d초",m:"일분",mm:"%d분",h:"한시간",hh:"%d시간",d:"하루",dd:"%d일",M:"한달",MM:"%d달",y:"일년",yy:"%d년"},ordinal:function(a){return"일"}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("kr",a)}(),function(){var a={months:"januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des".split("_"),weekdays:"søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag".split("_"),weekdaysShort:"søn_man_tir_ons_tor_fre_lør".split("_"),longDateFormat:{LT:"HH:mm",L:"YYYY-MM-DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},meridiem:{AM:"AM",am:"am",PM:"PM",pm:"pm"},calendar:{sameDay:"[I dag klokken] LT",nextDay:"[I morgen klokken] LT",nextWeek:"dddd [klokken] LT",lastDay:"[I går klokken] LT",lastWeek:"[Forrige] dddd [klokken] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"for %s siden",s:"noen sekunder",m:"ett minutt",mm:"%d minutter",h:"en time",hh:"%d timer",d:"en dag",dd:"%d dager",M:"en måned",MM:"%d måneder",y:"ett år",yy:"%d år"},ordinal:function(a){return"."}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("nb",a)}(),function(){var a={months:"januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december".split("_"),monthsShort:"jan._feb._mar._apr._mei._jun._jul._aug._sep._okt._nov._dec.".split("_"),weekdays:"zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag".split("_"),weekdaysShort:"zo._ma._di._wo._do._vr._za.".split("_"),longDateFormat:{LT:"HH:mm",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},meridiem:{AM:"AM",am:"am",PM:"PM",pm:"pm"},calendar:{sameDay:"[Vandaag om] LT",nextDay:"[Morgen om] LT",nextWeek:"dddd [om] LT",lastDay:"[Gisteren om] LT",lastWeek:"[afgelopen] dddd [om] LT",sameElse:"L"},relativeTime:{future:"over %s",past:"%s geleden",s:"een paar seconden",m:"één minuut",mm:"%d minuten",h:"één uur",hh:"%d uur",d:"één dag",dd:"%d dagen",M:"één maand",MM:"%d maanden",y:"één jaar",yy:"%d jaar"},ordinal:function(a){return a===1||a===8||a>=20?"ste":"de"}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("nl",a)}(),function(){var a=function(a){return a%10<5&&a%10>1&&~~(a/10)!==1},b=function(b,c,d){var e=b+" ";switch(d){case"m":return c?"minuta":"minutę";case"mm":return e+(a(b)?"minuty":"minut");case"h":return c?"godzina":"godzinę";case"hh":return e+(a(b)?"godziny":"godzin");case"MM":return e+(a(b)?"miesiące":"miesięcy");case"yy":return e+(a(b)?"lata":"lat")}},c={months:"styczeń_luty_marzec_kwiecień_maj_czerwiec_lipiec_sierpień_wrzesień_październik_listopad_grudzień".split("_"),monthsShort:"sty_lut_mar_kwi_maj_cze_lip_sie_wrz_paź_lis_gru".split("_"),weekdays:"niedziela_poniedziałek_wtorek_środa_czwartek_piątek_sobota".split("_"),weekdaysShort:"nie_pon_wt_śr_czw_pt_sb".split("_"),longDateFormat:{LT:"HH:mm",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd, D MMMM YYYY LT"},meridiem:{AM:"AM",am:"am",PM:"PM",pm:"pm"},calendar:{sameDay:"[Dziś o] LT",nextDay:"[Jutro o] LT",nextWeek:"[W] dddd [o] LT",lastDay:"[Wczoraj o] LT",lastWeek:"[W zeszły/łą] dddd [o] LT",sameElse:"L"},relativeTime:{future:"za %s",past:"%s temu",s:"kilka sekund",m:b,mm:b,h:b,hh:b,d:"1 dzień",dd:"%d dni",M:"miesiąc",MM:b,y:"rok",yy:b},ordinal:function(a){return"."}};typeof module!="undefined"&&(module.exports=c),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("pl",c)}(),function(){var a={months:"Janeiro_Fevereiro_Março_Abril_Maio_Junho_Julho_Agosto_Setembro_Outubro_Novembro_Dezembro".split("_"),monthsShort:"Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez".split("_"),weekdays:"Domingo_Segunda-feira_Terça-feira_Quarta-feira_Quinta-feira_Sexta-feira_Sábado".split("_"),weekdaysShort:"Dom_Seg_Ter_Qua_Qui_Sex_Sáb".split("_"),longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D \\de MMMM \\de YYYY",LLL:"D \\de MMMM \\de YYYY LT",LLLL:"dddd, D \\de MMMM \\de YYYY LT"},meridiem:{AM:"AM",am:"am",PM:"PM",pm:"pm"},calendar:{sameDay:"[Hoje às] LT",nextDay:"[Amanhã às] LT",nextWeek:"dddd [às] LT",lastDay:"[Ontem às] LT",lastWeek:function(){return this.day()===0||this.day()===6?"[Último] dddd [às] LT":"[Última] dddd [às] LT"},sameElse:"L"},relativeTime:{future:"em %s",past:"%s atrás",s:"segundos",m:"um minuto",mm:"%d minutos",h:"uma hora",hh:"%d horas",d:"um dia",dd:"%d dias",M:"um mês",MM:"%d meses",y:"um ano",yy:"%d anos"},ordinal:function(a){return"º"}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("pt",a)}(),function(){var a={months:"январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь".split("_"),monthsShort:"янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек".split("_"),weekdays:"воскресенье_понедельник_вторник_среда_четверг_пятница_суббота".split("_"),weekdaysShort:"вск_пнд_втр_срд_чтв_птн_суб".split("_"),longDateFormat:{LT:"HH:mm",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd, D MMMM YYYY LT"},calendar:{sameDay:"[Сегодня в] LT",nextDay:"[Завтра в] LT",lastDay:"[Вчера в] LT",nextWeek:function(){return this.day()===1?"[Во] dddd [в] LT":"[В] dddd [в] LT"},lastWeek:function(){switch(this.day()){case 0:case 1:case 3:return"[В прошлый] dddd [в] LT";case 6:return"[В прошлое] dddd [в] LT";default:return"[В прошлую] dddd [в] LT"}},sameElse:"L"},relativeTime:{future:"через %s",past:"%s назад",s:"несколько секунд",m:"минут",mm:"%d минут",h:"часа",hh:"%d часов",d:"1 день",dd:"%d дней",M:"месяц",MM:"%d месяцев",y:"год",yy:"%d лет"},ordinal:function(a){return"."}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("ru",a)}(),function(){var a={months:"januari_februari_mars_april_maj_juni_juli_augusti_september_oktober_november_december".split("_"),monthsShort:"jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec".split("_"),weekdays:"söndag_måndag_tisdag_onsdag_torsdag_fredag_lördag".split("_"),weekdaysShort:"sön_mån_tis_ons_tor_fre_lör".split("_"),longDateFormat:{LT:"HH:mm",L:"YYYY-MM-DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},meridiem:{AM:"AM",am:"am",PM:"PM",pm:"pm"},calendar:{sameDay:"[Idag klockan] LT",nextDay:"[Imorgon klockan] LT",lastDay:"[Igår klockan] LT",nextWeek:"dddd [klockan] LT",lastWeek:"[Förra] dddd [en klockan] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"för %s sen",s:"några sekunder",m:"en minut",mm:"%d minuter",h:"en timme",hh:"%d timmar",d:"en dag",dd:"%d dagar",M:"en månad",MM:"%d månader",y:"ett år",yy:"%d år"},ordinal:function(a){var b=a%10;return~~(a%100/10)===1?"e":b===1?"a":b===2?"a":b===3?"e":"e"}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("sv",a)}() \ No newline at end of file +(function(){var a={months:"Gener_Febrer_Març_Abril_Maig_Juny_Juliol_Agost_Setembre_Octubre_Novembre_Desembre".split("_"),monthsShort:"Gen._Febr._Mar._Abr._Mai._Jun._Jul._Ag._Set._Oct._Nov._Des.".split("_"),weekdays:"Diumenge_Dilluns_Dimarts_Dimecres_Dijous_Divendres_Dissabte".split("_"),weekdaysShort:"Dg._Dl._Dt._Dc._Dj._Dv._Ds.".split("_"),longDateFormat:{LT:"H:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},meridiem:{AM:"AM",am:"am",PM:"PM",pm:"pm"},calendar:{sameDay:function(){return"[avui a "+(this.hours()!==1?"les":"la")+"] LT"},nextDay:function(){return"[demá a "+(this.hours()!==1?"les":"la")+"] LT"},nextWeek:function(){return"dddd [a "+(this.hours()!==1?"les":"la")+"] LT"},lastDay:function(){return"[ahir a "+(this.hours()!==1?"les":"la")+"] LT"},lastWeek:function(){return"[el] dddd [passat a "+(this.hours()!==1?"les":"la")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"fa %s",s:"uns segons",m:"un minut",mm:"%d minuts",h:"una hora",hh:"%d hores",d:"un dia",dd:"%d dies",M:"un mes",MM:"%d mesos",y:"un any",yy:"%d anys"},ordinal:function(a){return"º"}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("ca",a)})(),function(){var a={months:"Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Febr._Mrz._Apr._Mai_Jun._Jul._Aug._Sept._Okt._Nov._Dez.".split("_"),weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),longDateFormat:{LT:"H:mm U\\hr",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY LT",LLLL:"dddd, D. MMMM YYYY LT"},meridiem:{AM:"AM",am:"am",PM:"PM",pm:"pm"},calendar:{sameDay:"[Heute um] LT",sameElse:"L",nextDay:"[Morgen um] LT",nextWeek:"dddd [um] LT",lastDay:"[Gestern um] LT",lastWeek:"[letzten] dddd [um] LT"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",m:"einer Minute",mm:"%d Minuten",h:"einer Stunde",hh:"%d Stunden",d:"einem Tag",dd:"%d Tagen",M:"einem Monat",MM:"%d Monaten",y:"einem Jahr",yy:"%d Jahren"},ordinal:function(a){return"."}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("de",a)}(),function(){var a={months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),longDateFormat:{LT:"h:mm A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd, D MMMM YYYY LT"},meridiem:{AM:"AM",am:"am",PM:"PM",pm:"pm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},ordinal:function(a){var b=a%10;return~~(a%100/10)===1?"th":b===1?"st":b===2?"nd":b===3?"rd":"th"}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("en-gb",a)}(),function(){var a={months:"Enero_Febrero_Marzo_Abril_Mayo_Junio_Julio_Agosto_Septiembre_Octubre_Noviembre_Diciembre".split("_"),monthsShort:"Ene._Feb._Mar._Abr._May._Jun._Jul._Ago._Sep._Oct._Nov._Dic.".split("_"),weekdays:"Domingo_Lunes_Martes_Miércoles_Jueves_Viernes_Sábado".split("_"),weekdaysShort:"Dom._Lun._Mar._Mié._Jue._Vie._Sáb.".split("_"),longDateFormat:{LT:"H:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},meridiem:{AM:"AM",am:"am",PM:"PM",pm:"pm"},calendar:{sameDay:function(){return"[hoy a la"+(this.hours()!==1?"s":"")+"] LT"},nextDay:function(){return"[mañana a la"+(this.hours()!==1?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(this.hours()!==1?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(this.hours()!==1?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(this.hours()!==1?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},ordinal:function(a){return"º"}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("es",a)}(),function(){var a={months:"urtarrila_otsaila_martxoa_apirila_maiatza_ekaina_uztaila_abuztua_iraila_urria_azaroa_abendua".split("_"),monthsShort:"urt._ots._mar._api._mai._eka._uzt._abu._ira._urr._aza._abe.".split("_"),weekdays:"igandea_astelehena_asteartea_asteazkena_osteguna_ostirala_larunbata".split("_"),weekdaysShort:"ig._al._ar._az._og._ol._lr.".split("_"),longDateFormat:{LT:"HH:mm",L:"YYYY-MM-DD",LL:"YYYYko MMMMren D[a]",LLL:"YYYYko MMMMren D[a] LT",LLLL:"dddd, YYYYko MMMMren D[a] LT"},meridiem:{AM:"AM",am:"am",PM:"PM",pm:"pm"},calendar:{sameDay:"[gaur] LT[etan]",nextDay:"[bihar] LT[etan]",nextWeek:"dddd LT[etan]",lastDay:"[atzo] LT[etan]",lastWeek:"[aurreko] dddd LT[etan]",sameElse:"L"},relativeTime:{future:"%s barru",past:"duela %s",s:"segundo batzuk",m:"minutu bat",mm:"%d minutu",h:"ordu bat",hh:"%d ordu",d:"egun bat",dd:"%d egun",M:"hilabete bat",MM:"%d hilabete",y:"urte bat",yy:"%d urte"},ordinal:function(a){return"."}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("eu",a)}(),function(){var a={months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},meridiem:{AM:"AM",am:"am",PM:"PM",pm:"pm"},calendar:{sameDay:"[Ajourd'hui à] LT",nextDay:"[Demain à] LT",nextWeek:"dddd [à] LT",lastDay:"[Hier à] LT",lastWeek:"dddd [denier à] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"une année",yy:"%d années"},ordinal:function(a){return a===1?"er":"ème"}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("fr",a)}(),function(){var a={months:"Xaneiro_Febreiro_Marzo_Abril_Maio_Xuño_Xullo_Agosto_Setembro_Octubro_Novembro_Decembro".split("_"),monthsShort:"Xan._Feb._Mar._Abr._Mai._Xuñ._Xul._Ago._Set._Out._Nov._Dec.".split("_"),weekdays:"Domingo_Luns_Martes_Mércores_Xoves_Venres_Sábado".split("_"),weekdaysShort:"Dom._Lun._Mar._Mér._Xov._Ven._Sáb.".split("_"),longDateFormat:{LT:"H:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},meridiem:{AM:"AM",am:"am",PM:"PM",pm:"pm"},calendar:{sameDay:function(){return"[hoxe "+(this.hours()!==1?"ás":"a")+"] LT"},nextDay:function(){return"[mañá "+(this.hours()!==1?"ás":"a")+"] LT"},nextWeek:function(){return"dddd ["+(this.hours()!==1?"ás":"a")+"] LT"},lastDay:function(){return"[onte "+(this.hours()!==1?"á":"a")+"] LT"},lastWeek:function(){return"[o] dddd [pasado "+(this.hours()!==1?"ás":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"fai %s",s:"uns segundo",m:"un minuto",mm:"%d minutos",h:"unha hora",hh:"%d horas",d:"un día",dd:"%d días",M:"un mes",MM:"%d meses",y:"un ano",yy:"%d anos"},ordinal:function(a){return"º"}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("gl",a)}(),function(){var a={months:"Gennaio_Febbraio_Marzo_Aprile_Maggio_Giugno_Luglio_Agosto_Settebre_Ottobre_Novembre_Dicembre".split("_"),monthsShort:"Gen_Feb_Mar_Apr_Mag_Giu_Lug_Ago_Set_Ott_Nov_Dic".split("_"),weekdays:"Domenica_Lunedi_Martedi_Mercoledi_Giovedi_Venerdi_Sabato".split("_"),weekdaysShort:"Dom_Lun_Mar_Mer_Gio_Ven_Sab".split("_"),longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd, D MMMM YYYY LT"},meridiem:{AM:"AM",am:"am",PM:"PM",pm:"pm"},calendar:{sameDay:"[Oggi alle] LT",nextDay:"[Domani alle] LT",nextWeek:"dddd [alle] LT",lastDay:"[Ieri alle] LT",lastWeek:"[lo scorso] dddd [alle] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s fa",s:"secondi",m:"un minuto",mm:"%d minuti",h:"un ora",hh:"%d ore",d:"un giorno",dd:"%d giorni",M:"un mese",MM:"%d mesi",y:"un anno",yy:"%d anni"},ordinal:function(){return"º"}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("it",a)}(),function(){var a={months:"1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"),monthsShort:"1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"),weekdays:"일요일_월요일_화요일_수요일_목요일_금요일_토요일".split("_"),weekdaysShort:"일_월_화_수_목_금_토".split("_"),longDateFormat:{LT:"A h시 mm분",L:"YYYY.MM.DD",LL:"YYYY년 MMMM D일",LLL:"YYYY년 MMMM D일 LT",LLLL:"YYYY년 MMMM D일 dddd LT"},meridiem:{AM:"오전",am:"오전",PM:"오후",pm:"오후"},calendar:{sameDay:"오늘 LT",nextDay:"내일 LT",nextWeek:"dddd LT",lastDay:"어제 LT",lastWeek:"지난주 dddd LT",sameElse:"L"},relativeTime:{future:"%s 후",past:"%s 전",s:"몇초",ss:"%d초",m:"일분",mm:"%d분",h:"한시간",hh:"%d시간",d:"하루",dd:"%d일",M:"한달",MM:"%d달",y:"일년",yy:"%d년"},ordinal:function(a){return"일"}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("kr",a)}(),function(){var a={months:"januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des".split("_"),weekdays:"søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag".split("_"),weekdaysShort:"søn_man_tir_ons_tor_fre_lør".split("_"),longDateFormat:{LT:"HH:mm",L:"YYYY-MM-DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},meridiem:{AM:"AM",am:"am",PM:"PM",pm:"pm"},calendar:{sameDay:"[I dag klokken] LT",nextDay:"[I morgen klokken] LT",nextWeek:"dddd [klokken] LT",lastDay:"[I går klokken] LT",lastWeek:"[Forrige] dddd [klokken] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"for %s siden",s:"noen sekunder",m:"ett minutt",mm:"%d minutter",h:"en time",hh:"%d timer",d:"en dag",dd:"%d dager",M:"en måned",MM:"%d måneder",y:"ett år",yy:"%d år"},ordinal:function(a){return"."}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("nb",a)}(),function(){var a={months:"januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december".split("_"),monthsShort:"jan._feb._mar._apr._mei._jun._jul._aug._sep._okt._nov._dec.".split("_"),weekdays:"zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag".split("_"),weekdaysShort:"zo._ma._di._wo._do._vr._za.".split("_"),longDateFormat:{LT:"HH:mm",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},meridiem:{AM:"AM",am:"am",PM:"PM",pm:"pm"},calendar:{sameDay:"[Vandaag om] LT",nextDay:"[Morgen om] LT",nextWeek:"dddd [om] LT",lastDay:"[Gisteren om] LT",lastWeek:"[afgelopen] dddd [om] LT",sameElse:"L"},relativeTime:{future:"over %s",past:"%s geleden",s:"een paar seconden",m:"één minuut",mm:"%d minuten",h:"één uur",hh:"%d uur",d:"één dag",dd:"%d dagen",M:"één maand",MM:"%d maanden",y:"één jaar",yy:"%d jaar"},ordinal:function(a){return a===1||a===8||a>=20?"ste":"de"}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("nl",a)}(),function(){var a=function(a){return a%10<5&&a%10>1&&~~(a/10)!==1},b=function(b,c,d){var e=b+" ";switch(d){case"m":return c?"minuta":"minutę";case"mm":return e+(a(b)?"minuty":"minut");case"h":return c?"godzina":"godzinę";case"hh":return e+(a(b)?"godziny":"godzin");case"MM":return e+(a(b)?"miesiące":"miesięcy");case"yy":return e+(a(b)?"lata":"lat")}},c={months:"styczeń_luty_marzec_kwiecień_maj_czerwiec_lipiec_sierpień_wrzesień_październik_listopad_grudzień".split("_"),monthsShort:"sty_lut_mar_kwi_maj_cze_lip_sie_wrz_paź_lis_gru".split("_"),weekdays:"niedziela_poniedziałek_wtorek_środa_czwartek_piątek_sobota".split("_"),weekdaysShort:"nie_pon_wt_śr_czw_pt_sb".split("_"),longDateFormat:{LT:"HH:mm",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd, D MMMM YYYY LT"},meridiem:{AM:"AM",am:"am",PM:"PM",pm:"pm"},calendar:{sameDay:"[Dziś o] LT",nextDay:"[Jutro o] LT",nextWeek:"[W] dddd [o] LT",lastDay:"[Wczoraj o] LT",lastWeek:"[W zeszły/łą] dddd [o] LT",sameElse:"L"},relativeTime:{future:"za %s",past:"%s temu",s:"kilka sekund",m:b,mm:b,h:b,hh:b,d:"1 dzień",dd:"%d dni",M:"miesiąc",MM:b,y:"rok",yy:b},ordinal:function(a){return"."}};typeof module!="undefined"&&(module.exports=c),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("pl",c)}(),function(){var a={months:"Janeiro_Fevereiro_Março_Abril_Maio_Junho_Julho_Agosto_Setembro_Outubro_Novembro_Dezembro".split("_"),monthsShort:"Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez".split("_"),weekdays:"Domingo_Segunda-feira_Terça-feira_Quarta-feira_Quinta-feira_Sexta-feira_Sábado".split("_"),weekdaysShort:"Dom_Seg_Ter_Qua_Qui_Sex_Sáb".split("_"),longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D \\de MMMM \\de YYYY",LLL:"D \\de MMMM \\de YYYY LT",LLLL:"dddd, D \\de MMMM \\de YYYY LT"},meridiem:{AM:"AM",am:"am",PM:"PM",pm:"pm"},calendar:{sameDay:"[Hoje às] LT",nextDay:"[Amanhã às] LT",nextWeek:"dddd [às] LT",lastDay:"[Ontem às] LT",lastWeek:function(){return this.day()===0||this.day()===6?"[Último] dddd [às] LT":"[Última] dddd [às] LT"},sameElse:"L"},relativeTime:{future:"em %s",past:"%s atrás",s:"segundos",m:"um minuto",mm:"%d minutos",h:"uma hora",hh:"%d horas",d:"um dia",dd:"%d dias",M:"um mês",MM:"%d meses",y:"um ano",yy:"%d anos"},ordinal:function(a){return"º"}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("pt",a)}(),function(){var a={months:"январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь".split("_"),monthsShort:"янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек".split("_"),weekdays:"воскресенье_понедельник_вторник_среда_четверг_пятница_суббота".split("_"),weekdaysShort:"вск_пнд_втр_срд_чтв_птн_суб".split("_"),longDateFormat:{LT:"HH:mm",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd, D MMMM YYYY LT"},calendar:{sameDay:"[Сегодня в] LT",nextDay:"[Завтра в] LT",lastDay:"[Вчера в] LT",nextWeek:function(){return this.day()===1?"[Во] dddd [в] LT":"[В] dddd [в] LT"},lastWeek:function(){switch(this.day()){case 0:case 1:case 3:return"[В прошлый] dddd [в] LT";case 6:return"[В прошлое] dddd [в] LT";default:return"[В прошлую] dddd [в] LT"}},sameElse:"L"},relativeTime:{future:"через %s",past:"%s назад",s:"несколько секунд",m:"минут",mm:"%d минут",h:"часа",hh:"%d часов",d:"1 день",dd:"%d дней",M:"месяц",MM:"%d месяцев",y:"год",yy:"%d лет"},ordinal:function(a){return"."}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("ru",a)}(),function(){var a={months:"januari_februari_mars_april_maj_juni_juli_augusti_september_oktober_november_december".split("_"),monthsShort:"jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec".split("_"),weekdays:"söndag_måndag_tisdag_onsdag_torsdag_fredag_lördag".split("_"),weekdaysShort:"sön_mån_tis_ons_tor_fre_lör".split("_"),longDateFormat:{LT:"HH:mm",L:"YYYY-MM-DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},meridiem:{AM:"AM",am:"am",PM:"PM",pm:"pm"},calendar:{sameDay:"[Idag klockan] LT",nextDay:"[Imorgon klockan] LT",lastDay:"[Igår klockan] LT",nextWeek:"dddd [klockan] LT",lastWeek:"[Förra] dddd [en klockan] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"för %s sen",s:"några sekunder",m:"en minut",mm:"%d minuter",h:"en timme",hh:"%d timmar",d:"en dag",dd:"%d dagar",M:"en månad",MM:"%d månader",y:"ett år",yy:"%d år"},ordinal:function(a){var b=a%10;return~~(a%100/10)===1?"e":b===1?"a":b===2?"a":b===3?"e":"e"}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("sv",a)}() \ No newline at end of file diff --git a/site/js/test.min.js b/site/js/test.min.js index 88a8a8975..73c605407 100644 --- a/site/js/test.min.js +++ b/site/js/test.min.js @@ -1849,6 +1849,204 @@ test("zone", 2, function() { })(); (function() { var moment; if (typeof window === 'undefined') { moment = require('../../moment'); module = QUnit.module; } else { moment = window.moment; } +/************************************************** + Català + *************************************************/ + +module("lang:ca"); + +test("parse", 96, function() { + moment.lang('ca'); + + var tests = "Gener Gen._Febrer Febr._Març Mar._Abril Abr._Maig Mai._Juny Jun._Juliol Jul._Agost Ag._Setembre Set._Octubre Oct._Novembre Nov._Desembre Des.".split("_"); + + var i; + function equalTest(input, mmm, i) { + equal(moment(input, mmm).month(), i, input + ' should be month ' + (i + 1)); + } + for (i = 0; i < 12; i++) { + tests[i] = tests[i].split(' '); + equalTest(tests[i][0], 'MMM', i); + equalTest(tests[i][1], 'MMM', i); + equalTest(tests[i][0], 'MMMM', i); + equalTest(tests[i][1], 'MMMM', i); + equalTest(tests[i][0].toLocaleLowerCase(), 'MMMM', i); + equalTest(tests[i][1].toLocaleLowerCase(), 'MMMM', i); + equalTest(tests[i][0].toLocaleUpperCase(), 'MMMM', i); + equalTest(tests[i][1].toLocaleUpperCase(), 'MMMM', i); + } +}); + +test("format ordinal", 31, function() { + moment.lang('ca'); + equal(moment([2011, 0, 1]).format('DDDo'), '1º', '1º'); + equal(moment([2011, 0, 2]).format('DDDo'), '2º', '2º'); + equal(moment([2011, 0, 3]).format('DDDo'), '3º', '3º'); + equal(moment([2011, 0, 4]).format('DDDo'), '4º', '4º'); + equal(moment([2011, 0, 5]).format('DDDo'), '5º', '5º'); + equal(moment([2011, 0, 6]).format('DDDo'), '6º', '6º'); + equal(moment([2011, 0, 7]).format('DDDo'), '7º', '7º'); + equal(moment([2011, 0, 8]).format('DDDo'), '8º', '8º'); + equal(moment([2011, 0, 9]).format('DDDo'), '9º', '9º'); + equal(moment([2011, 0, 10]).format('DDDo'), '10º', '10º'); + + equal(moment([2011, 0, 11]).format('DDDo'), '11º', '11º'); + equal(moment([2011, 0, 12]).format('DDDo'), '12º', '12º'); + equal(moment([2011, 0, 13]).format('DDDo'), '13º', '13º'); + equal(moment([2011, 0, 14]).format('DDDo'), '14º', '14º'); + equal(moment([2011, 0, 15]).format('DDDo'), '15º', '15º'); + equal(moment([2011, 0, 16]).format('DDDo'), '16º', '16º'); + equal(moment([2011, 0, 17]).format('DDDo'), '17º', '17º'); + equal(moment([2011, 0, 18]).format('DDDo'), '18º', '18º'); + equal(moment([2011, 0, 19]).format('DDDo'), '19º', '19º'); + equal(moment([2011, 0, 20]).format('DDDo'), '20º', '20º'); + + equal(moment([2011, 0, 21]).format('DDDo'), '21º', '21º'); + equal(moment([2011, 0, 22]).format('DDDo'), '22º', '22º'); + equal(moment([2011, 0, 23]).format('DDDo'), '23º', '23º'); + equal(moment([2011, 0, 24]).format('DDDo'), '24º', '24º'); + equal(moment([2011, 0, 25]).format('DDDo'), '25º', '25º'); + equal(moment([2011, 0, 26]).format('DDDo'), '26º', '26º'); + equal(moment([2011, 0, 27]).format('DDDo'), '27º', '27º'); + equal(moment([2011, 0, 28]).format('DDDo'), '28º', '28º'); + equal(moment([2011, 0, 29]).format('DDDo'), '29º', '29º'); + equal(moment([2011, 0, 30]).format('DDDo'), '30º', '30º'); + + equal(moment([2011, 0, 31]).format('DDDo'), '31º', '31º'); +}); + +test("format month", 12, function() { + moment.lang('ca'); + var expected = "Gener Gen._Febrer Febr._Març Mar._Abril Abr._Maig Mai._Juny Jun._Juliol Jul._Agost Ag._Setembre Set._Octubre Oct._Novembre Nov._Desembre Des.".split("_"); + var i; + for (i = 0; i < expected.length; i++) { + equal(moment([2011, i, 0]).format('MMMM MMM'), expected[i], expected[i]); + } +}); + +test("format week", 7, function() { + moment.lang('ca'); + var expected = "Diumenge Dg._Dilluns Dl._Dimarts Dt._Dimecres Dc._Dijous Dj._Divendres Dv._Dissabte Ds.".split("_"); + + var i; + for (i = 0; i < expected.length; i++) { + equal(moment([2011, 0, 2 + i]).format('dddd ddd'), expected[i], expected[i]); + } +}); + +test("from", 30, function() { + moment.lang('ca'); + var start = moment([2007, 1, 28]); + equal(start.from(moment([2007, 1, 28]).add({s:44}), true), "uns segons", "44 seconds = a few seconds"); + equal(start.from(moment([2007, 1, 28]).add({s:45}), true), "un minut", "45 seconds = a minute"); + equal(start.from(moment([2007, 1, 28]).add({s:89}), true), "un minut", "89 seconds = a minute"); + equal(start.from(moment([2007, 1, 28]).add({s:90}), true), "2 minuts", "90 seconds = 2 minutes"); + equal(start.from(moment([2007, 1, 28]).add({m:44}), true), "44 minuts", "44 minutes = 44 minutes"); + equal(start.from(moment([2007, 1, 28]).add({m:45}), true), "una hora", "45 minutes = an hour"); + equal(start.from(moment([2007, 1, 28]).add({m:89}), true), "una hora", "89 minutes = an hour"); + equal(start.from(moment([2007, 1, 28]).add({m:90}), true), "2 hores", "90 minutes = 2 hours"); + equal(start.from(moment([2007, 1, 28]).add({h:5}), true), "5 hores", "5 hours = 5 hours"); + equal(start.from(moment([2007, 1, 28]).add({h:21}), true), "21 hores", "21 hours = 21 hours"); + equal(start.from(moment([2007, 1, 28]).add({h:22}), true), "un dia", "22 hours = a day"); + equal(start.from(moment([2007, 1, 28]).add({h:35}), true), "un dia", "35 hours = a day"); + equal(start.from(moment([2007, 1, 28]).add({h:36}), true), "2 dies", "36 hours = 2 days"); + equal(start.from(moment([2007, 1, 28]).add({d:1}), true), "un dia", "1 day = a day"); + equal(start.from(moment([2007, 1, 28]).add({d:5}), true), "5 dies", "5 days = 5 days"); + equal(start.from(moment([2007, 1, 28]).add({d:25}), true), "25 dies", "25 days = 25 days"); + equal(start.from(moment([2007, 1, 28]).add({d:26}), true), "un mes", "26 days = a month"); + equal(start.from(moment([2007, 1, 28]).add({d:30}), true), "un mes", "30 days = a month"); + equal(start.from(moment([2007, 1, 28]).add({d:45}), true), "un mes", "45 days = a month"); + equal(start.from(moment([2007, 1, 28]).add({d:46}), true), "2 mesos", "46 days = 2 months"); + equal(start.from(moment([2007, 1, 28]).add({d:74}), true), "2 mesos", "75 days = 2 months"); + equal(start.from(moment([2007, 1, 28]).add({d:76}), true), "3 mesos", "76 days = 3 months"); + equal(start.from(moment([2007, 1, 28]).add({M:1}), true), "un mes", "1 month = a month"); + equal(start.from(moment([2007, 1, 28]).add({M:5}), true), "5 mesos", "5 months = 5 months"); + equal(start.from(moment([2007, 1, 28]).add({d:344}), true), "11 mesos", "344 days = 11 months"); + equal(start.from(moment([2007, 1, 28]).add({d:345}), true), "un any", "345 days = a year"); + equal(start.from(moment([2007, 1, 28]).add({d:547}), true), "un any", "547 days = a year"); + equal(start.from(moment([2007, 1, 28]).add({d:548}), true), "2 anys", "548 days = 2 years"); + equal(start.from(moment([2007, 1, 28]).add({y:1}), true), "un any", "1 year = a year"); + equal(start.from(moment([2007, 1, 28]).add({y:5}), true), "5 anys", "5 years = 5 years"); +}); + +test("suffix", 2, function() { + moment.lang('ca'); + equal(moment(30000).from(0), "en uns segons", "prefix"); + equal(moment(0).from(30000), "fa uns segons", "suffix"); +}); + + +test("now from now", 1, function() { + moment.lang('ca'); + equal(moment().fromNow(), "fa uns segons", "now from now should display as in the past"); +}); + + +test("fromNow", 2, function() { + moment.lang('ca'); + equal(moment().add({s:30}).fromNow(), "en uns segons", "en uns segons"); + equal(moment().add({d:5}).fromNow(), "en 5 dies", "en 5 dies"); +}); + + +test("calendar day", 7, function() { + moment.lang('ca'); + + var a = moment().hours(2).minutes(0).seconds(0); + + equal(moment(a).calendar(), "avui a les 2:00", "today at the same time"); + equal(moment(a).add({ m: 25 }).calendar(), "avui a les 2:25", "Now plus 25 min"); + equal(moment(a).add({ h: 1 }).calendar(), "avui a les 3:00", "Now plus 1 hour"); + equal(moment(a).add({ d: 1 }).calendar(), "demá a les 2:00", "tomorrow at the same time"); + equal(moment(a).add({ d: 1, h : -1 }).calendar(), "demá a la 1:00", "tomorrow minus 1 hour"); + equal(moment(a).subtract({ h: 1 }).calendar(), "avui a la 1:00", "Now minus 1 hour"); + equal(moment(a).subtract({ d: 1 }).calendar(), "ahir a les 2:00", "yesterday at the same time"); +}); + +test("calendar next week", 15, function() { + moment.lang('ca'); + + var i; + var m; + + for (i = 2; i < 7; i++) { + m = moment().add({ d: i }); + equal(m.calendar(), m.format('dddd [a ' + ((m.hours() !== 1) ? 'les' : 'la') + '] LT'), "Today + " + i + " days current time"); + m.hours(0).minutes(0).seconds(0).milliseconds(0); + equal(m.calendar(), m.format('dddd [a ' + ((m.hours() !== 1) ? 'les' : 'la') + '] LT'), "Today + " + i + " days beginning of day"); + m.hours(23).minutes(59).seconds(59).milliseconds(999); + equal(m.calendar(), m.format('dddd [a ' + ((m.hours() !== 1) ? 'les' : 'la') + '] LT'), "Today + " + i + " days end of day"); + } +}); + +test("calendar last week", 15, function() { + moment.lang('ca'); + + for (i = 2; i < 7; i++) { + m = moment().subtract({ d: i }); + equal(m.calendar(), m.format('[el] dddd [passat a ' + ((m.hours() !== 1) ? 'les' : 'la') + '] LT'), "Today - " + i + " days current time"); + m.hours(0).minutes(0).seconds(0).milliseconds(0); + equal(m.calendar(), m.format('[el] dddd [passat a ' + ((m.hours() !== 1) ? 'les' : 'la') + '] LT'), "Today - " + i + " days beginning of day"); + m.hours(23).minutes(59).seconds(59).milliseconds(999); + equal(m.calendar(), m.format('[el] dddd [passat a ' + ((m.hours() !== 1) ? 'les' : 'la') + '] LT'), "Today - " + i + " days end of day"); + } +}); + +test("calendar all else", 4, function() { + moment.lang('ca'); + var weeksAgo = moment().subtract({ w: 1 }); + var weeksFromNow = moment().add({ w: 1 }); + + equal(weeksAgo.calendar(), weeksAgo.format('L'), "1 week ago"); + equal(weeksFromNow.calendar(), weeksFromNow.format('L'), "in 1 week"); + + weeksAgo = moment().subtract({ w: 2 }); + weeksFromNow = moment().add({ w: 2 }); + + equal(weeksAgo.calendar(), weeksAgo.format('L'), "2 weeks ago"); + equal(weeksFromNow.calendar(), weeksFromNow.format('L'), "in 2 weeks"); +}); + /************************************************** German *************************************************/ @@ -2705,15 +2903,14 @@ test("calendar all else", 4, function() { }); /************************************************** - Galego + Euskara *************************************************/ -module("lang:gl"); +module("lang:eu"); test("parse", 96, function() { - moment.lang('gl'); - var tests = "Xaneiro Xan._Febreiro Feb._Marzo Mar._Abril Abr._Maio Mai._Xuño Xuñ._Xullo Xul._Agosto Ago._Setembro Set._Octubro Out._Novembro Nov._Decembro Dec.".split("_"); - + moment.lang('eu'); + var tests = 'urtarrila urt._otsaila ots._martxoa mar._apirila api._maiatza mai._ekaina eka._uztaila uzt._abuztua abu._iraila ira._urria urr._azaroa aza._abendua abe.'.split("_"); var i; function equalTest(input, mmm, i) { equal(moment(input, mmm).month(), i, input + ' should be month ' + (i + 1)); @@ -2731,47 +2928,76 @@ test("parse", 96, function() { } }); +test("format", 18, function() { + moment.lang('eu'); + var a = [ + ['dddd, MMMM Do YYYY, h:mm:ss a', 'igandea, otsaila 14. 2010, 3:25:50 pm'], + ['ddd, hA', 'ig., 3PM'], + ['M Mo MM MMMM MMM', '2 2. 02 otsaila ots.'], + ['YYYY YY', '2010 10'], + ['D Do DD', '14 14. 14'], + ['d do dddd ddd', '0 0. igandea ig.'], + ['DDD DDDo DDDD', '45 45. 045'], + ['w wo ww', '8 8. 08'], + ['h hh', '3 03'], + ['H HH', '15 15'], + ['m mm', '25 25'], + ['s ss', '50 50'], + ['a A', 'pm PM'], + ['t\\he DDDo \\d\\ay of t\\he ye\\ar', 'the 45. day of the year'], + ['L', '2010-02-14'], + ['LL', '2010ko otsailaren 14a'], + ['LLL', '2010ko otsailaren 14a 15:25'], + ['LLLL', 'igandea, 2010ko otsailaren 14a 15:25'] + ], + b = moment(new Date(2010, 1, 14, 15, 25, 50, 125)), + i; + for (i = 0; i < a.length; i++) { + equal(b.format(a[i][0]), a[i][1], a[i][0] + ' ---> ' + a[i][1]); + } +}); + test("format ordinal", 31, function() { - moment.lang('es'); - equal(moment([2011, 0, 1]).format('DDDo'), '1º', '1º'); - equal(moment([2011, 0, 2]).format('DDDo'), '2º', '2º'); - equal(moment([2011, 0, 3]).format('DDDo'), '3º', '3º'); - equal(moment([2011, 0, 4]).format('DDDo'), '4º', '4º'); - equal(moment([2011, 0, 5]).format('DDDo'), '5º', '5º'); - equal(moment([2011, 0, 6]).format('DDDo'), '6º', '6º'); - equal(moment([2011, 0, 7]).format('DDDo'), '7º', '7º'); - equal(moment([2011, 0, 8]).format('DDDo'), '8º', '8º'); - equal(moment([2011, 0, 9]).format('DDDo'), '9º', '9º'); - equal(moment([2011, 0, 10]).format('DDDo'), '10º', '10º'); + moment.lang('eu'); + equal(moment([2011, 0, 1]).format('DDDo'), '1.', '1.'); + equal(moment([2011, 0, 2]).format('DDDo'), '2.', '2.'); + equal(moment([2011, 0, 3]).format('DDDo'), '3.', '3.'); + equal(moment([2011, 0, 4]).format('DDDo'), '4.', '4.'); + equal(moment([2011, 0, 5]).format('DDDo'), '5.', '5.'); + equal(moment([2011, 0, 6]).format('DDDo'), '6.', '6.'); + equal(moment([2011, 0, 7]).format('DDDo'), '7.', '7.'); + equal(moment([2011, 0, 8]).format('DDDo'), '8.', '8.'); + equal(moment([2011, 0, 9]).format('DDDo'), '9.', '9.'); + equal(moment([2011, 0, 10]).format('DDDo'), '10.', '10.'); - equal(moment([2011, 0, 11]).format('DDDo'), '11º', '11º'); - equal(moment([2011, 0, 12]).format('DDDo'), '12º', '12º'); - equal(moment([2011, 0, 13]).format('DDDo'), '13º', '13º'); - equal(moment([2011, 0, 14]).format('DDDo'), '14º', '14º'); - equal(moment([2011, 0, 15]).format('DDDo'), '15º', '15º'); - equal(moment([2011, 0, 16]).format('DDDo'), '16º', '16º'); - equal(moment([2011, 0, 17]).format('DDDo'), '17º', '17º'); - equal(moment([2011, 0, 18]).format('DDDo'), '18º', '18º'); - equal(moment([2011, 0, 19]).format('DDDo'), '19º', '19º'); - equal(moment([2011, 0, 20]).format('DDDo'), '20º', '20º'); + equal(moment([2011, 0, 11]).format('DDDo'), '11.', '11.'); + equal(moment([2011, 0, 12]).format('DDDo'), '12.', '12.'); + equal(moment([2011, 0, 13]).format('DDDo'), '13.', '13.'); + equal(moment([2011, 0, 14]).format('DDDo'), '14.', '14.'); + equal(moment([2011, 0, 15]).format('DDDo'), '15.', '15.'); + equal(moment([2011, 0, 16]).format('DDDo'), '16.', '16.'); + equal(moment([2011, 0, 17]).format('DDDo'), '17.', '17.'); + equal(moment([2011, 0, 18]).format('DDDo'), '18.', '18.'); + equal(moment([2011, 0, 19]).format('DDDo'), '19.', '19.'); + equal(moment([2011, 0, 20]).format('DDDo'), '20.', '20.'); - equal(moment([2011, 0, 21]).format('DDDo'), '21º', '21º'); - equal(moment([2011, 0, 22]).format('DDDo'), '22º', '22º'); - equal(moment([2011, 0, 23]).format('DDDo'), '23º', '23º'); - equal(moment([2011, 0, 24]).format('DDDo'), '24º', '24º'); - equal(moment([2011, 0, 25]).format('DDDo'), '25º', '25º'); - equal(moment([2011, 0, 26]).format('DDDo'), '26º', '26º'); - equal(moment([2011, 0, 27]).format('DDDo'), '27º', '27º'); - equal(moment([2011, 0, 28]).format('DDDo'), '28º', '28º'); - equal(moment([2011, 0, 29]).format('DDDo'), '29º', '29º'); - equal(moment([2011, 0, 30]).format('DDDo'), '30º', '30º'); + equal(moment([2011, 0, 21]).format('DDDo'), '21.', '21.'); + equal(moment([2011, 0, 22]).format('DDDo'), '22.', '22.'); + equal(moment([2011, 0, 23]).format('DDDo'), '23.', '23.'); + equal(moment([2011, 0, 24]).format('DDDo'), '24.', '24.'); + equal(moment([2011, 0, 25]).format('DDDo'), '25.', '25.'); + equal(moment([2011, 0, 26]).format('DDDo'), '26.', '26.'); + equal(moment([2011, 0, 27]).format('DDDo'), '27.', '27.'); + equal(moment([2011, 0, 28]).format('DDDo'), '28.', '28.'); + equal(moment([2011, 0, 29]).format('DDDo'), '29.', '29.'); + equal(moment([2011, 0, 30]).format('DDDo'), '30.', '30.'); - equal(moment([2011, 0, 31]).format('DDDo'), '31º', '31º'); + equal(moment([2011, 0, 31]).format('DDDo'), '31.', '31.'); }); test("format month", 12, function() { - moment.lang('gl'); - var expected = "Xaneiro Xan._Febreiro Feb._Marzo Mar._Abril Abr._Maio Mai._Xuño Xuñ._Xullo Xul._Agosto Ago._Setembro Set._Octubro Out._Novembro Nov._Decembro Dec.".split("_"); + moment.lang('eu'); + var expected = 'urtarrila urt._otsaila ots._martxoa mar._apirila api._maiatza mai._ekaina eka._uztaila uzt._abuztua abu._iraila ira._urria urr._azaroa aza._abendua abe.'.split("_"); var i; for (i = 0; i < expected.length; i++) { equal(moment([2011, i, 0]).format('MMMM MMM'), expected[i], expected[i]); @@ -2779,9 +3005,8 @@ test("format month", 12, function() { }); test("format week", 7, function() { - moment.lang('gl'); - var expected = "Domingo Dom._Luns Lun._Martes Mar._Mércores Mér._Xoves Xov._Venres Ven._Sábado Sáb.".split("_"); - + moment.lang('eu'); + var expected = 'igandea ig._astelehena al._asteartea ar._asteazkena az._osteguna og._ostirala ol._larunbata lr.'.split("_"); var i; for (i = 0; i < expected.length; i++) { equal(moment([2011, 0, 2 + i]).format('dddd ddd'), expected[i], expected[i]); @@ -2789,232 +3014,7 @@ test("format week", 7, function() { }); test("from", 30, function() { - moment.lang('gl'); - var start = moment([2007, 1, 28]); - - equal(start.from(moment([2007, 1, 28]).add({s:44}), true), "uns segundo", "44 seconds = a few seconds"); - equal(start.from(moment([2007, 1, 28]).add({s:45}), true), "un minuto", "45 seconds = a minute"); - equal(start.from(moment([2007, 1, 28]).add({s:89}), true), "un minuto", "89 seconds = a minute"); - equal(start.from(moment([2007, 1, 28]).add({s:90}), true), "2 minutos", "90 seconds = 2 minutes"); - equal(start.from(moment([2007, 1, 28]).add({m:44}), true), "44 minutos", "44 minutes = 44 minutes"); - equal(start.from(moment([2007, 1, 28]).add({m:45}), true), "unha hora", "45 minutes = an hour"); - equal(start.from(moment([2007, 1, 28]).add({m:89}), true), "unha hora", "89 minutes = an hour"); - equal(start.from(moment([2007, 1, 28]).add({m:90}), true), "2 horas", "90 minutes = 2 hours"); - equal(start.from(moment([2007, 1, 28]).add({h:5}), true), "5 horas", "5 hours = 5 hours"); - equal(start.from(moment([2007, 1, 28]).add({h:21}), true), "21 horas", "21 hours = 21 hours"); - equal(start.from(moment([2007, 1, 28]).add({h:22}), true), "un día", "22 hours = a day"); - equal(start.from(moment([2007, 1, 28]).add({h:35}), true), "un día", "35 hours = a day"); - equal(start.from(moment([2007, 1, 28]).add({h:36}), true), "2 días", "36 hours = 2 days"); - equal(start.from(moment([2007, 1, 28]).add({d:1}), true), "un día", "1 day = a day"); - equal(start.from(moment([2007, 1, 28]).add({d:5}), true), "5 días", "5 days = 5 days"); - equal(start.from(moment([2007, 1, 28]).add({d:25}), true), "25 días", "25 days = 25 days"); - equal(start.from(moment([2007, 1, 28]).add({d:26}), true), "un mes", "26 days = a month"); - equal(start.from(moment([2007, 1, 28]).add({d:30}), true), "un mes", "30 days = a month"); - equal(start.from(moment([2007, 1, 28]).add({d:45}), true), "un mes", "45 days = a month"); - equal(start.from(moment([2007, 1, 28]).add({d:46}), true), "2 meses", "46 days = 2 months"); - equal(start.from(moment([2007, 1, 28]).add({d:74}), true), "2 meses", "75 days = 2 months"); - equal(start.from(moment([2007, 1, 28]).add({d:76}), true), "3 meses", "76 days = 3 months"); - equal(start.from(moment([2007, 1, 28]).add({M:1}), true), "un mes", "1 month = a month"); - equal(start.from(moment([2007, 1, 28]).add({M:5}), true), "5 meses", "5 months = 5 months"); - equal(start.from(moment([2007, 1, 28]).add({d:344}), true), "11 meses", "344 days = 11 months"); - equal(start.from(moment([2007, 1, 28]).add({d:345}), true), "un ano", "345 days = a year"); - equal(start.from(moment([2007, 1, 28]).add({d:547}), true), "un ano", "547 days = a year"); - equal(start.from(moment([2007, 1, 28]).add({d:548}), true), "2 anos", "548 days = 2 years"); - equal(start.from(moment([2007, 1, 28]).add({y:1}), true), "un ano", "1 year = a year"); - equal(start.from(moment([2007, 1, 28]).add({y:5}), true), "5 anos", "5 years = 5 years"); -}); - -test("suffix", 2, function() { - moment.lang('gl'); - equal(moment(30000).from(0), "en uns segundo", "prefix"); - equal(moment(0).from(30000), "fai uns segundo", "suffix"); -}); - - -test("now from now", 1, function() { - moment.lang('gl'); - equal(moment().fromNow(), "fai uns segundo", "now from now should display as in the past"); -}); - - -test("fromNow", 2, function() { - moment.lang('gl'); - equal(moment().add({s:30}).fromNow(), "en uns segundo", "en unos segundos"); - equal(moment().add({d:5}).fromNow(), "en 5 días", "en 5 días"); -}); - - -test("calendar day", 7, function() { - moment.lang('gl'); - - var a = moment().hours(2).minutes(0).seconds(0); - - equal(moment(a).calendar(), "hoxe ás 2:00", "today at the same time"); - equal(moment(a).add({ m: 25 }).calendar(), "hoxe ás 2:25", "Now plus 25 min"); - equal(moment(a).add({ h: 1 }).calendar(), "hoxe ás 3:00", "Now plus 1 hour"); - equal(moment(a).add({ d: 1 }).calendar(), "mañá ás 2:00", "tomorrow at the same time"); - equal(moment(a).add({ d: 1, h : -1 }).calendar(), "mañá a 1:00", "tomorrow minus 1 hour"); - equal(moment(a).subtract({ h: 1 }).calendar(), "hoxe a 1:00", "Now minus 1 hour"); - equal(moment(a).subtract({ d: 1 }).calendar(), "onte á 2:00", "yesterday at the same time"); -}); - -test("calendar next week", 15, function() { - moment.lang('gl'); - - var i; - var m; - - for (i = 2; i < 7; i++) { - m = moment().add({ d: i }); - equal(m.calendar(), m.format('dddd [' + ((m.hours() !== 1) ? 'ás' : 'a') + '] LT'), "Today + " + i + " days current time"); - m.hours(0).minutes(0).seconds(0).milliseconds(0); - equal(m.calendar(), m.format('dddd [' + ((m.hours() !== 1) ? 'ás' : 'a') + '] LT'), "Today + " + i + " days beginning of day"); - m.hours(23).minutes(59).seconds(59).milliseconds(999); - equal(m.calendar(), m.format('dddd [' + ((m.hours() !== 1) ? 'ás' : 'a') + '] LT'), "Today + " + i + " days end of day"); - } -}); - -test("calendar last week", 15, function() { - moment.lang('gl'); - - for (i = 2; i < 7; i++) { - m = moment().subtract({ d: i }); - equal(m.calendar(), m.format('[o] dddd [pasado ' + ((m.hours() !== 1) ? 'ás' : 'a') + '] LT'), "Today - " + i + " days current time"); - m.hours(0).minutes(0).seconds(0).milliseconds(0); - equal(m.calendar(), m.format('[o] dddd [pasado ' + ((m.hours() !== 1) ? 'ás' : 'a') + '] LT'), "Today - " + i + " days beginning of day"); - m.hours(23).minutes(59).seconds(59).milliseconds(999); - equal(m.calendar(), m.format('[o] dddd [pasado ' + ((m.hours() !== 1) ? 'ás' : 'a') + '] LT'), "Today - " + i + " days end of day"); - } -}); - -test("calendar all else", 4, function() { - moment.lang('gl'); - var weeksAgo = moment().subtract({ w: 1 }); - var weeksFromNow = moment().add({ w: 1 }); - - equal(weeksAgo.calendar(), weeksAgo.format('L'), "1 week ago"); - equal(weeksFromNow.calendar(), weeksFromNow.format('L'), "in 1 week"); - - weeksAgo = moment().subtract({ w: 2 }); - weeksFromNow = moment().add({ w: 2 }); - - equal(weeksAgo.calendar(), weeksAgo.format('L'), "2 weeks ago"); - equal(weeksFromNow.calendar(), weeksFromNow.format('L'), "in 2 weeks"); -}); - -/************************************************** - Euskara - *************************************************/ - -module("lang:eu"); - -test("parse", 96, function() { - moment.lang('eu'); - var tests = 'urtarrila urt._otsaila ots._martxoa mar._apirila api._maiatza mai._ekaina eka._uztaila uzt._abuztua abu._iraila ira._urria urr._azaroa aza._abendua abe.'.split("_"); - var i; - function equalTest(input, mmm, i) { - equal(moment(input, mmm).month(), i, input + ' should be month ' + (i + 1)); - } - for (i = 0; i < 12; i++) { - tests[i] = tests[i].split(' '); - equalTest(tests[i][0], 'MMM', i); - equalTest(tests[i][1], 'MMM', i); - equalTest(tests[i][0], 'MMMM', i); - equalTest(tests[i][1], 'MMMM', i); - equalTest(tests[i][0].toLocaleLowerCase(), 'MMMM', i); - equalTest(tests[i][1].toLocaleLowerCase(), 'MMMM', i); - equalTest(tests[i][0].toLocaleUpperCase(), 'MMMM', i); - equalTest(tests[i][1].toLocaleUpperCase(), 'MMMM', i); - } -}); - -test("format", 18, function() { - moment.lang('eu'); - var a = [ - ['dddd, MMMM Do YYYY, h:mm:ss a', 'igandea, otsaila 14. 2010, 3:25:50 pm'], - ['ddd, hA', 'ig., 3PM'], - ['M Mo MM MMMM MMM', '2 2. 02 otsaila ots.'], - ['YYYY YY', '2010 10'], - ['D Do DD', '14 14. 14'], - ['d do dddd ddd', '0 0. igandea ig.'], - ['DDD DDDo DDDD', '45 45. 045'], - ['w wo ww', '8 8. 08'], - ['h hh', '3 03'], - ['H HH', '15 15'], - ['m mm', '25 25'], - ['s ss', '50 50'], - ['a A', 'pm PM'], - ['t\\he DDDo \\d\\ay of t\\he ye\\ar', 'the 45. day of the year'], - ['L', '2010-02-14'], - ['LL', '2010ko otsailaren 14a'], - ['LLL', '2010ko otsailaren 14a 15:25'], - ['LLLL', 'igandea, 2010ko otsailaren 14a 15:25'] - ], - b = moment(new Date(2010, 1, 14, 15, 25, 50, 125)), - i; - for (i = 0; i < a.length; i++) { - equal(b.format(a[i][0]), a[i][1], a[i][0] + ' ---> ' + a[i][1]); - } -}); - -test("format ordinal", 31, function() { - moment.lang('eu'); - equal(moment([2011, 0, 1]).format('DDDo'), '1.', '1.'); - equal(moment([2011, 0, 2]).format('DDDo'), '2.', '2.'); - equal(moment([2011, 0, 3]).format('DDDo'), '3.', '3.'); - equal(moment([2011, 0, 4]).format('DDDo'), '4.', '4.'); - equal(moment([2011, 0, 5]).format('DDDo'), '5.', '5.'); - equal(moment([2011, 0, 6]).format('DDDo'), '6.', '6.'); - equal(moment([2011, 0, 7]).format('DDDo'), '7.', '7.'); - equal(moment([2011, 0, 8]).format('DDDo'), '8.', '8.'); - equal(moment([2011, 0, 9]).format('DDDo'), '9.', '9.'); - equal(moment([2011, 0, 10]).format('DDDo'), '10.', '10.'); - - equal(moment([2011, 0, 11]).format('DDDo'), '11.', '11.'); - equal(moment([2011, 0, 12]).format('DDDo'), '12.', '12.'); - equal(moment([2011, 0, 13]).format('DDDo'), '13.', '13.'); - equal(moment([2011, 0, 14]).format('DDDo'), '14.', '14.'); - equal(moment([2011, 0, 15]).format('DDDo'), '15.', '15.'); - equal(moment([2011, 0, 16]).format('DDDo'), '16.', '16.'); - equal(moment([2011, 0, 17]).format('DDDo'), '17.', '17.'); - equal(moment([2011, 0, 18]).format('DDDo'), '18.', '18.'); - equal(moment([2011, 0, 19]).format('DDDo'), '19.', '19.'); - equal(moment([2011, 0, 20]).format('DDDo'), '20.', '20.'); - - equal(moment([2011, 0, 21]).format('DDDo'), '21.', '21.'); - equal(moment([2011, 0, 22]).format('DDDo'), '22.', '22.'); - equal(moment([2011, 0, 23]).format('DDDo'), '23.', '23.'); - equal(moment([2011, 0, 24]).format('DDDo'), '24.', '24.'); - equal(moment([2011, 0, 25]).format('DDDo'), '25.', '25.'); - equal(moment([2011, 0, 26]).format('DDDo'), '26.', '26.'); - equal(moment([2011, 0, 27]).format('DDDo'), '27.', '27.'); - equal(moment([2011, 0, 28]).format('DDDo'), '28.', '28.'); - equal(moment([2011, 0, 29]).format('DDDo'), '29.', '29.'); - equal(moment([2011, 0, 30]).format('DDDo'), '30.', '30.'); - - equal(moment([2011, 0, 31]).format('DDDo'), '31.', '31.'); -}); - -test("format month", 12, function() { - moment.lang('eu'); - var expected = 'urtarrila urt._otsaila ots._martxoa mar._apirila api._maiatza mai._ekaina eka._uztaila uzt._abuztua abu._iraila ira._urria urr._azaroa aza._abendua abe.'.split("_"); - var i; - for (i = 0; i < expected.length; i++) { - equal(moment([2011, i, 0]).format('MMMM MMM'), expected[i], expected[i]); - } -}); - -test("format week", 7, function() { - moment.lang('eu'); - var expected = 'igandea ig._astelehena al._asteartea ar._asteazkena az._osteguna og._ostirala ol._larunbata lr.'.split("_"); - var i; - for (i = 0; i < expected.length; i++) { - equal(moment([2011, 0, 2 + i]).format('dddd ddd'), expected[i], expected[i]); - } -}); - -test("from", 30, function() { - moment.lang('eu'); + moment.lang('eu'); var start = moment([2007, 1, 28]); equal(start.from(moment([2007, 1, 28]).add({s:44}), true), "segundo batzuk", "44 seconds = a few seconds"); equal(start.from(moment([2007, 1, 28]).add({s:45}), true), "minutu bat", "45 seconds = a minute"); @@ -3340,6 +3340,204 @@ test("same all else", 4, function() { equal(weeksFromNow.calendar(), weeksFromNow.format('L'), "in 2 weeks"); }); +/************************************************** + Galego + *************************************************/ + +module("lang:gl"); + +test("parse", 96, function() { + moment.lang('gl'); + var tests = "Xaneiro Xan._Febreiro Feb._Marzo Mar._Abril Abr._Maio Mai._Xuño Xuñ._Xullo Xul._Agosto Ago._Setembro Set._Octubro Out._Novembro Nov._Decembro Dec.".split("_"); + + var i; + function equalTest(input, mmm, i) { + equal(moment(input, mmm).month(), i, input + ' should be month ' + (i + 1)); + } + for (i = 0; i < 12; i++) { + tests[i] = tests[i].split(' '); + equalTest(tests[i][0], 'MMM', i); + equalTest(tests[i][1], 'MMM', i); + equalTest(tests[i][0], 'MMMM', i); + equalTest(tests[i][1], 'MMMM', i); + equalTest(tests[i][0].toLocaleLowerCase(), 'MMMM', i); + equalTest(tests[i][1].toLocaleLowerCase(), 'MMMM', i); + equalTest(tests[i][0].toLocaleUpperCase(), 'MMMM', i); + equalTest(tests[i][1].toLocaleUpperCase(), 'MMMM', i); + } +}); + +test("format ordinal", 31, function() { + moment.lang('es'); + equal(moment([2011, 0, 1]).format('DDDo'), '1º', '1º'); + equal(moment([2011, 0, 2]).format('DDDo'), '2º', '2º'); + equal(moment([2011, 0, 3]).format('DDDo'), '3º', '3º'); + equal(moment([2011, 0, 4]).format('DDDo'), '4º', '4º'); + equal(moment([2011, 0, 5]).format('DDDo'), '5º', '5º'); + equal(moment([2011, 0, 6]).format('DDDo'), '6º', '6º'); + equal(moment([2011, 0, 7]).format('DDDo'), '7º', '7º'); + equal(moment([2011, 0, 8]).format('DDDo'), '8º', '8º'); + equal(moment([2011, 0, 9]).format('DDDo'), '9º', '9º'); + equal(moment([2011, 0, 10]).format('DDDo'), '10º', '10º'); + + equal(moment([2011, 0, 11]).format('DDDo'), '11º', '11º'); + equal(moment([2011, 0, 12]).format('DDDo'), '12º', '12º'); + equal(moment([2011, 0, 13]).format('DDDo'), '13º', '13º'); + equal(moment([2011, 0, 14]).format('DDDo'), '14º', '14º'); + equal(moment([2011, 0, 15]).format('DDDo'), '15º', '15º'); + equal(moment([2011, 0, 16]).format('DDDo'), '16º', '16º'); + equal(moment([2011, 0, 17]).format('DDDo'), '17º', '17º'); + equal(moment([2011, 0, 18]).format('DDDo'), '18º', '18º'); + equal(moment([2011, 0, 19]).format('DDDo'), '19º', '19º'); + equal(moment([2011, 0, 20]).format('DDDo'), '20º', '20º'); + + equal(moment([2011, 0, 21]).format('DDDo'), '21º', '21º'); + equal(moment([2011, 0, 22]).format('DDDo'), '22º', '22º'); + equal(moment([2011, 0, 23]).format('DDDo'), '23º', '23º'); + equal(moment([2011, 0, 24]).format('DDDo'), '24º', '24º'); + equal(moment([2011, 0, 25]).format('DDDo'), '25º', '25º'); + equal(moment([2011, 0, 26]).format('DDDo'), '26º', '26º'); + equal(moment([2011, 0, 27]).format('DDDo'), '27º', '27º'); + equal(moment([2011, 0, 28]).format('DDDo'), '28º', '28º'); + equal(moment([2011, 0, 29]).format('DDDo'), '29º', '29º'); + equal(moment([2011, 0, 30]).format('DDDo'), '30º', '30º'); + + equal(moment([2011, 0, 31]).format('DDDo'), '31º', '31º'); +}); + +test("format month", 12, function() { + moment.lang('gl'); + var expected = "Xaneiro Xan._Febreiro Feb._Marzo Mar._Abril Abr._Maio Mai._Xuño Xuñ._Xullo Xul._Agosto Ago._Setembro Set._Octubro Out._Novembro Nov._Decembro Dec.".split("_"); + var i; + for (i = 0; i < expected.length; i++) { + equal(moment([2011, i, 0]).format('MMMM MMM'), expected[i], expected[i]); + } +}); + +test("format week", 7, function() { + moment.lang('gl'); + var expected = "Domingo Dom._Luns Lun._Martes Mar._Mércores Mér._Xoves Xov._Venres Ven._Sábado Sáb.".split("_"); + + var i; + for (i = 0; i < expected.length; i++) { + equal(moment([2011, 0, 2 + i]).format('dddd ddd'), expected[i], expected[i]); + } +}); + +test("from", 30, function() { + moment.lang('gl'); + var start = moment([2007, 1, 28]); + + equal(start.from(moment([2007, 1, 28]).add({s:44}), true), "uns segundo", "44 seconds = a few seconds"); + equal(start.from(moment([2007, 1, 28]).add({s:45}), true), "un minuto", "45 seconds = a minute"); + equal(start.from(moment([2007, 1, 28]).add({s:89}), true), "un minuto", "89 seconds = a minute"); + equal(start.from(moment([2007, 1, 28]).add({s:90}), true), "2 minutos", "90 seconds = 2 minutes"); + equal(start.from(moment([2007, 1, 28]).add({m:44}), true), "44 minutos", "44 minutes = 44 minutes"); + equal(start.from(moment([2007, 1, 28]).add({m:45}), true), "unha hora", "45 minutes = an hour"); + equal(start.from(moment([2007, 1, 28]).add({m:89}), true), "unha hora", "89 minutes = an hour"); + equal(start.from(moment([2007, 1, 28]).add({m:90}), true), "2 horas", "90 minutes = 2 hours"); + equal(start.from(moment([2007, 1, 28]).add({h:5}), true), "5 horas", "5 hours = 5 hours"); + equal(start.from(moment([2007, 1, 28]).add({h:21}), true), "21 horas", "21 hours = 21 hours"); + equal(start.from(moment([2007, 1, 28]).add({h:22}), true), "un día", "22 hours = a day"); + equal(start.from(moment([2007, 1, 28]).add({h:35}), true), "un día", "35 hours = a day"); + equal(start.from(moment([2007, 1, 28]).add({h:36}), true), "2 días", "36 hours = 2 days"); + equal(start.from(moment([2007, 1, 28]).add({d:1}), true), "un día", "1 day = a day"); + equal(start.from(moment([2007, 1, 28]).add({d:5}), true), "5 días", "5 days = 5 days"); + equal(start.from(moment([2007, 1, 28]).add({d:25}), true), "25 días", "25 days = 25 days"); + equal(start.from(moment([2007, 1, 28]).add({d:26}), true), "un mes", "26 days = a month"); + equal(start.from(moment([2007, 1, 28]).add({d:30}), true), "un mes", "30 days = a month"); + equal(start.from(moment([2007, 1, 28]).add({d:45}), true), "un mes", "45 days = a month"); + equal(start.from(moment([2007, 1, 28]).add({d:46}), true), "2 meses", "46 days = 2 months"); + equal(start.from(moment([2007, 1, 28]).add({d:74}), true), "2 meses", "75 days = 2 months"); + equal(start.from(moment([2007, 1, 28]).add({d:76}), true), "3 meses", "76 days = 3 months"); + equal(start.from(moment([2007, 1, 28]).add({M:1}), true), "un mes", "1 month = a month"); + equal(start.from(moment([2007, 1, 28]).add({M:5}), true), "5 meses", "5 months = 5 months"); + equal(start.from(moment([2007, 1, 28]).add({d:344}), true), "11 meses", "344 days = 11 months"); + equal(start.from(moment([2007, 1, 28]).add({d:345}), true), "un ano", "345 days = a year"); + equal(start.from(moment([2007, 1, 28]).add({d:547}), true), "un ano", "547 days = a year"); + equal(start.from(moment([2007, 1, 28]).add({d:548}), true), "2 anos", "548 days = 2 years"); + equal(start.from(moment([2007, 1, 28]).add({y:1}), true), "un ano", "1 year = a year"); + equal(start.from(moment([2007, 1, 28]).add({y:5}), true), "5 anos", "5 years = 5 years"); +}); + +test("suffix", 2, function() { + moment.lang('gl'); + equal(moment(30000).from(0), "en uns segundo", "prefix"); + equal(moment(0).from(30000), "fai uns segundo", "suffix"); +}); + + +test("now from now", 1, function() { + moment.lang('gl'); + equal(moment().fromNow(), "fai uns segundo", "now from now should display as in the past"); +}); + + +test("fromNow", 2, function() { + moment.lang('gl'); + equal(moment().add({s:30}).fromNow(), "en uns segundo", "en unos segundos"); + equal(moment().add({d:5}).fromNow(), "en 5 días", "en 5 días"); +}); + + +test("calendar day", 7, function() { + moment.lang('gl'); + + var a = moment().hours(2).minutes(0).seconds(0); + + equal(moment(a).calendar(), "hoxe ás 2:00", "today at the same time"); + equal(moment(a).add({ m: 25 }).calendar(), "hoxe ás 2:25", "Now plus 25 min"); + equal(moment(a).add({ h: 1 }).calendar(), "hoxe ás 3:00", "Now plus 1 hour"); + equal(moment(a).add({ d: 1 }).calendar(), "mañá ás 2:00", "tomorrow at the same time"); + equal(moment(a).add({ d: 1, h : -1 }).calendar(), "mañá a 1:00", "tomorrow minus 1 hour"); + equal(moment(a).subtract({ h: 1 }).calendar(), "hoxe a 1:00", "Now minus 1 hour"); + equal(moment(a).subtract({ d: 1 }).calendar(), "onte á 2:00", "yesterday at the same time"); +}); + +test("calendar next week", 15, function() { + moment.lang('gl'); + + var i; + var m; + + for (i = 2; i < 7; i++) { + m = moment().add({ d: i }); + equal(m.calendar(), m.format('dddd [' + ((m.hours() !== 1) ? 'ás' : 'a') + '] LT'), "Today + " + i + " days current time"); + m.hours(0).minutes(0).seconds(0).milliseconds(0); + equal(m.calendar(), m.format('dddd [' + ((m.hours() !== 1) ? 'ás' : 'a') + '] LT'), "Today + " + i + " days beginning of day"); + m.hours(23).minutes(59).seconds(59).milliseconds(999); + equal(m.calendar(), m.format('dddd [' + ((m.hours() !== 1) ? 'ás' : 'a') + '] LT'), "Today + " + i + " days end of day"); + } +}); + +test("calendar last week", 15, function() { + moment.lang('gl'); + + for (i = 2; i < 7; i++) { + m = moment().subtract({ d: i }); + equal(m.calendar(), m.format('[o] dddd [pasado ' + ((m.hours() !== 1) ? 'ás' : 'a') + '] LT'), "Today - " + i + " days current time"); + m.hours(0).minutes(0).seconds(0).milliseconds(0); + equal(m.calendar(), m.format('[o] dddd [pasado ' + ((m.hours() !== 1) ? 'ás' : 'a') + '] LT'), "Today - " + i + " days beginning of day"); + m.hours(23).minutes(59).seconds(59).milliseconds(999); + equal(m.calendar(), m.format('[o] dddd [pasado ' + ((m.hours() !== 1) ? 'ás' : 'a') + '] LT'), "Today - " + i + " days end of day"); + } +}); + +test("calendar all else", 4, function() { + moment.lang('gl'); + var weeksAgo = moment().subtract({ w: 1 }); + var weeksFromNow = moment().add({ w: 1 }); + + equal(weeksAgo.calendar(), weeksAgo.format('L'), "1 week ago"); + equal(weeksFromNow.calendar(), weeksFromNow.format('L'), "in 1 week"); + + weeksAgo = moment().subtract({ w: 2 }); + weeksFromNow = moment().add({ w: 2 }); + + equal(weeksAgo.calendar(), weeksAgo.format('L'), "2 weeks ago"); + equal(weeksFromNow.calendar(), weeksFromNow.format('L'), "in 2 weeks"); +}); + /************************************************** Italian *************************************************/ diff --git a/sitesrc/js/lang-tests.js b/sitesrc/js/lang-tests.js index e5ddbe068..163c2efbd 100644 --- a/sitesrc/js/lang-tests.js +++ b/sitesrc/js/lang-tests.js @@ -1,4 +1,202 @@ (function() { var moment; if (typeof window === 'undefined') { moment = require('../../moment'); module = QUnit.module; } else { moment = window.moment; } +/************************************************** + Català + *************************************************/ + +module("lang:ca"); + +test("parse", 96, function() { + moment.lang('ca'); + + var tests = "Gener Gen._Febrer Febr._Març Mar._Abril Abr._Maig Mai._Juny Jun._Juliol Jul._Agost Ag._Setembre Set._Octubre Oct._Novembre Nov._Desembre Des.".split("_"); + + var i; + function equalTest(input, mmm, i) { + equal(moment(input, mmm).month(), i, input + ' should be month ' + (i + 1)); + } + for (i = 0; i < 12; i++) { + tests[i] = tests[i].split(' '); + equalTest(tests[i][0], 'MMM', i); + equalTest(tests[i][1], 'MMM', i); + equalTest(tests[i][0], 'MMMM', i); + equalTest(tests[i][1], 'MMMM', i); + equalTest(tests[i][0].toLocaleLowerCase(), 'MMMM', i); + equalTest(tests[i][1].toLocaleLowerCase(), 'MMMM', i); + equalTest(tests[i][0].toLocaleUpperCase(), 'MMMM', i); + equalTest(tests[i][1].toLocaleUpperCase(), 'MMMM', i); + } +}); + +test("format ordinal", 31, function() { + moment.lang('ca'); + equal(moment([2011, 0, 1]).format('DDDo'), '1º', '1º'); + equal(moment([2011, 0, 2]).format('DDDo'), '2º', '2º'); + equal(moment([2011, 0, 3]).format('DDDo'), '3º', '3º'); + equal(moment([2011, 0, 4]).format('DDDo'), '4º', '4º'); + equal(moment([2011, 0, 5]).format('DDDo'), '5º', '5º'); + equal(moment([2011, 0, 6]).format('DDDo'), '6º', '6º'); + equal(moment([2011, 0, 7]).format('DDDo'), '7º', '7º'); + equal(moment([2011, 0, 8]).format('DDDo'), '8º', '8º'); + equal(moment([2011, 0, 9]).format('DDDo'), '9º', '9º'); + equal(moment([2011, 0, 10]).format('DDDo'), '10º', '10º'); + + equal(moment([2011, 0, 11]).format('DDDo'), '11º', '11º'); + equal(moment([2011, 0, 12]).format('DDDo'), '12º', '12º'); + equal(moment([2011, 0, 13]).format('DDDo'), '13º', '13º'); + equal(moment([2011, 0, 14]).format('DDDo'), '14º', '14º'); + equal(moment([2011, 0, 15]).format('DDDo'), '15º', '15º'); + equal(moment([2011, 0, 16]).format('DDDo'), '16º', '16º'); + equal(moment([2011, 0, 17]).format('DDDo'), '17º', '17º'); + equal(moment([2011, 0, 18]).format('DDDo'), '18º', '18º'); + equal(moment([2011, 0, 19]).format('DDDo'), '19º', '19º'); + equal(moment([2011, 0, 20]).format('DDDo'), '20º', '20º'); + + equal(moment([2011, 0, 21]).format('DDDo'), '21º', '21º'); + equal(moment([2011, 0, 22]).format('DDDo'), '22º', '22º'); + equal(moment([2011, 0, 23]).format('DDDo'), '23º', '23º'); + equal(moment([2011, 0, 24]).format('DDDo'), '24º', '24º'); + equal(moment([2011, 0, 25]).format('DDDo'), '25º', '25º'); + equal(moment([2011, 0, 26]).format('DDDo'), '26º', '26º'); + equal(moment([2011, 0, 27]).format('DDDo'), '27º', '27º'); + equal(moment([2011, 0, 28]).format('DDDo'), '28º', '28º'); + equal(moment([2011, 0, 29]).format('DDDo'), '29º', '29º'); + equal(moment([2011, 0, 30]).format('DDDo'), '30º', '30º'); + + equal(moment([2011, 0, 31]).format('DDDo'), '31º', '31º'); +}); + +test("format month", 12, function() { + moment.lang('ca'); + var expected = "Gener Gen._Febrer Febr._Març Mar._Abril Abr._Maig Mai._Juny Jun._Juliol Jul._Agost Ag._Setembre Set._Octubre Oct._Novembre Nov._Desembre Des.".split("_"); + var i; + for (i = 0; i < expected.length; i++) { + equal(moment([2011, i, 0]).format('MMMM MMM'), expected[i], expected[i]); + } +}); + +test("format week", 7, function() { + moment.lang('ca'); + var expected = "Diumenge Dg._Dilluns Dl._Dimarts Dt._Dimecres Dc._Dijous Dj._Divendres Dv._Dissabte Ds.".split("_"); + + var i; + for (i = 0; i < expected.length; i++) { + equal(moment([2011, 0, 2 + i]).format('dddd ddd'), expected[i], expected[i]); + } +}); + +test("from", 30, function() { + moment.lang('ca'); + var start = moment([2007, 1, 28]); + equal(start.from(moment([2007, 1, 28]).add({s:44}), true), "uns segons", "44 seconds = a few seconds"); + equal(start.from(moment([2007, 1, 28]).add({s:45}), true), "un minut", "45 seconds = a minute"); + equal(start.from(moment([2007, 1, 28]).add({s:89}), true), "un minut", "89 seconds = a minute"); + equal(start.from(moment([2007, 1, 28]).add({s:90}), true), "2 minuts", "90 seconds = 2 minutes"); + equal(start.from(moment([2007, 1, 28]).add({m:44}), true), "44 minuts", "44 minutes = 44 minutes"); + equal(start.from(moment([2007, 1, 28]).add({m:45}), true), "una hora", "45 minutes = an hour"); + equal(start.from(moment([2007, 1, 28]).add({m:89}), true), "una hora", "89 minutes = an hour"); + equal(start.from(moment([2007, 1, 28]).add({m:90}), true), "2 hores", "90 minutes = 2 hours"); + equal(start.from(moment([2007, 1, 28]).add({h:5}), true), "5 hores", "5 hours = 5 hours"); + equal(start.from(moment([2007, 1, 28]).add({h:21}), true), "21 hores", "21 hours = 21 hours"); + equal(start.from(moment([2007, 1, 28]).add({h:22}), true), "un dia", "22 hours = a day"); + equal(start.from(moment([2007, 1, 28]).add({h:35}), true), "un dia", "35 hours = a day"); + equal(start.from(moment([2007, 1, 28]).add({h:36}), true), "2 dies", "36 hours = 2 days"); + equal(start.from(moment([2007, 1, 28]).add({d:1}), true), "un dia", "1 day = a day"); + equal(start.from(moment([2007, 1, 28]).add({d:5}), true), "5 dies", "5 days = 5 days"); + equal(start.from(moment([2007, 1, 28]).add({d:25}), true), "25 dies", "25 days = 25 days"); + equal(start.from(moment([2007, 1, 28]).add({d:26}), true), "un mes", "26 days = a month"); + equal(start.from(moment([2007, 1, 28]).add({d:30}), true), "un mes", "30 days = a month"); + equal(start.from(moment([2007, 1, 28]).add({d:45}), true), "un mes", "45 days = a month"); + equal(start.from(moment([2007, 1, 28]).add({d:46}), true), "2 mesos", "46 days = 2 months"); + equal(start.from(moment([2007, 1, 28]).add({d:74}), true), "2 mesos", "75 days = 2 months"); + equal(start.from(moment([2007, 1, 28]).add({d:76}), true), "3 mesos", "76 days = 3 months"); + equal(start.from(moment([2007, 1, 28]).add({M:1}), true), "un mes", "1 month = a month"); + equal(start.from(moment([2007, 1, 28]).add({M:5}), true), "5 mesos", "5 months = 5 months"); + equal(start.from(moment([2007, 1, 28]).add({d:344}), true), "11 mesos", "344 days = 11 months"); + equal(start.from(moment([2007, 1, 28]).add({d:345}), true), "un any", "345 days = a year"); + equal(start.from(moment([2007, 1, 28]).add({d:547}), true), "un any", "547 days = a year"); + equal(start.from(moment([2007, 1, 28]).add({d:548}), true), "2 anys", "548 days = 2 years"); + equal(start.from(moment([2007, 1, 28]).add({y:1}), true), "un any", "1 year = a year"); + equal(start.from(moment([2007, 1, 28]).add({y:5}), true), "5 anys", "5 years = 5 years"); +}); + +test("suffix", 2, function() { + moment.lang('ca'); + equal(moment(30000).from(0), "en uns segons", "prefix"); + equal(moment(0).from(30000), "fa uns segons", "suffix"); +}); + + +test("now from now", 1, function() { + moment.lang('ca'); + equal(moment().fromNow(), "fa uns segons", "now from now should display as in the past"); +}); + + +test("fromNow", 2, function() { + moment.lang('ca'); + equal(moment().add({s:30}).fromNow(), "en uns segons", "en uns segons"); + equal(moment().add({d:5}).fromNow(), "en 5 dies", "en 5 dies"); +}); + + +test("calendar day", 7, function() { + moment.lang('ca'); + + var a = moment().hours(2).minutes(0).seconds(0); + + equal(moment(a).calendar(), "avui a les 2:00", "today at the same time"); + equal(moment(a).add({ m: 25 }).calendar(), "avui a les 2:25", "Now plus 25 min"); + equal(moment(a).add({ h: 1 }).calendar(), "avui a les 3:00", "Now plus 1 hour"); + equal(moment(a).add({ d: 1 }).calendar(), "demá a les 2:00", "tomorrow at the same time"); + equal(moment(a).add({ d: 1, h : -1 }).calendar(), "demá a la 1:00", "tomorrow minus 1 hour"); + equal(moment(a).subtract({ h: 1 }).calendar(), "avui a la 1:00", "Now minus 1 hour"); + equal(moment(a).subtract({ d: 1 }).calendar(), "ahir a les 2:00", "yesterday at the same time"); +}); + +test("calendar next week", 15, function() { + moment.lang('ca'); + + var i; + var m; + + for (i = 2; i < 7; i++) { + m = moment().add({ d: i }); + equal(m.calendar(), m.format('dddd [a ' + ((m.hours() !== 1) ? 'les' : 'la') + '] LT'), "Today + " + i + " days current time"); + m.hours(0).minutes(0).seconds(0).milliseconds(0); + equal(m.calendar(), m.format('dddd [a ' + ((m.hours() !== 1) ? 'les' : 'la') + '] LT'), "Today + " + i + " days beginning of day"); + m.hours(23).minutes(59).seconds(59).milliseconds(999); + equal(m.calendar(), m.format('dddd [a ' + ((m.hours() !== 1) ? 'les' : 'la') + '] LT'), "Today + " + i + " days end of day"); + } +}); + +test("calendar last week", 15, function() { + moment.lang('ca'); + + for (i = 2; i < 7; i++) { + m = moment().subtract({ d: i }); + equal(m.calendar(), m.format('[el] dddd [passat a ' + ((m.hours() !== 1) ? 'les' : 'la') + '] LT'), "Today - " + i + " days current time"); + m.hours(0).minutes(0).seconds(0).milliseconds(0); + equal(m.calendar(), m.format('[el] dddd [passat a ' + ((m.hours() !== 1) ? 'les' : 'la') + '] LT'), "Today - " + i + " days beginning of day"); + m.hours(23).minutes(59).seconds(59).milliseconds(999); + equal(m.calendar(), m.format('[el] dddd [passat a ' + ((m.hours() !== 1) ? 'les' : 'la') + '] LT'), "Today - " + i + " days end of day"); + } +}); + +test("calendar all else", 4, function() { + moment.lang('ca'); + var weeksAgo = moment().subtract({ w: 1 }); + var weeksFromNow = moment().add({ w: 1 }); + + equal(weeksAgo.calendar(), weeksAgo.format('L'), "1 week ago"); + equal(weeksFromNow.calendar(), weeksFromNow.format('L'), "in 1 week"); + + weeksAgo = moment().subtract({ w: 2 }); + weeksFromNow = moment().add({ w: 2 }); + + equal(weeksAgo.calendar(), weeksAgo.format('L'), "2 weeks ago"); + equal(weeksFromNow.calendar(), weeksFromNow.format('L'), "in 2 weeks"); +}); + /************************************************** German *************************************************/ @@ -855,15 +1053,14 @@ test("calendar all else", 4, function() { }); /************************************************** - Galego + Euskara *************************************************/ -module("lang:gl"); +module("lang:eu"); test("parse", 96, function() { - moment.lang('gl'); - var tests = "Xaneiro Xan._Febreiro Feb._Marzo Mar._Abril Abr._Maio Mai._Xuño Xuñ._Xullo Xul._Agosto Ago._Setembro Set._Octubro Out._Novembro Nov._Decembro Dec.".split("_"); - + moment.lang('eu'); + var tests = 'urtarrila urt._otsaila ots._martxoa mar._apirila api._maiatza mai._ekaina eka._uztaila uzt._abuztua abu._iraila ira._urria urr._azaroa aza._abendua abe.'.split("_"); var i; function equalTest(input, mmm, i) { equal(moment(input, mmm).month(), i, input + ' should be month ' + (i + 1)); @@ -881,47 +1078,76 @@ test("parse", 96, function() { } }); +test("format", 18, function() { + moment.lang('eu'); + var a = [ + ['dddd, MMMM Do YYYY, h:mm:ss a', 'igandea, otsaila 14. 2010, 3:25:50 pm'], + ['ddd, hA', 'ig., 3PM'], + ['M Mo MM MMMM MMM', '2 2. 02 otsaila ots.'], + ['YYYY YY', '2010 10'], + ['D Do DD', '14 14. 14'], + ['d do dddd ddd', '0 0. igandea ig.'], + ['DDD DDDo DDDD', '45 45. 045'], + ['w wo ww', '8 8. 08'], + ['h hh', '3 03'], + ['H HH', '15 15'], + ['m mm', '25 25'], + ['s ss', '50 50'], + ['a A', 'pm PM'], + ['t\\he DDDo \\d\\ay of t\\he ye\\ar', 'the 45. day of the year'], + ['L', '2010-02-14'], + ['LL', '2010ko otsailaren 14a'], + ['LLL', '2010ko otsailaren 14a 15:25'], + ['LLLL', 'igandea, 2010ko otsailaren 14a 15:25'] + ], + b = moment(new Date(2010, 1, 14, 15, 25, 50, 125)), + i; + for (i = 0; i < a.length; i++) { + equal(b.format(a[i][0]), a[i][1], a[i][0] + ' ---> ' + a[i][1]); + } +}); + test("format ordinal", 31, function() { - moment.lang('es'); - equal(moment([2011, 0, 1]).format('DDDo'), '1º', '1º'); - equal(moment([2011, 0, 2]).format('DDDo'), '2º', '2º'); - equal(moment([2011, 0, 3]).format('DDDo'), '3º', '3º'); - equal(moment([2011, 0, 4]).format('DDDo'), '4º', '4º'); - equal(moment([2011, 0, 5]).format('DDDo'), '5º', '5º'); - equal(moment([2011, 0, 6]).format('DDDo'), '6º', '6º'); - equal(moment([2011, 0, 7]).format('DDDo'), '7º', '7º'); - equal(moment([2011, 0, 8]).format('DDDo'), '8º', '8º'); - equal(moment([2011, 0, 9]).format('DDDo'), '9º', '9º'); - equal(moment([2011, 0, 10]).format('DDDo'), '10º', '10º'); + moment.lang('eu'); + equal(moment([2011, 0, 1]).format('DDDo'), '1.', '1.'); + equal(moment([2011, 0, 2]).format('DDDo'), '2.', '2.'); + equal(moment([2011, 0, 3]).format('DDDo'), '3.', '3.'); + equal(moment([2011, 0, 4]).format('DDDo'), '4.', '4.'); + equal(moment([2011, 0, 5]).format('DDDo'), '5.', '5.'); + equal(moment([2011, 0, 6]).format('DDDo'), '6.', '6.'); + equal(moment([2011, 0, 7]).format('DDDo'), '7.', '7.'); + equal(moment([2011, 0, 8]).format('DDDo'), '8.', '8.'); + equal(moment([2011, 0, 9]).format('DDDo'), '9.', '9.'); + equal(moment([2011, 0, 10]).format('DDDo'), '10.', '10.'); - equal(moment([2011, 0, 11]).format('DDDo'), '11º', '11º'); - equal(moment([2011, 0, 12]).format('DDDo'), '12º', '12º'); - equal(moment([2011, 0, 13]).format('DDDo'), '13º', '13º'); - equal(moment([2011, 0, 14]).format('DDDo'), '14º', '14º'); - equal(moment([2011, 0, 15]).format('DDDo'), '15º', '15º'); - equal(moment([2011, 0, 16]).format('DDDo'), '16º', '16º'); - equal(moment([2011, 0, 17]).format('DDDo'), '17º', '17º'); - equal(moment([2011, 0, 18]).format('DDDo'), '18º', '18º'); - equal(moment([2011, 0, 19]).format('DDDo'), '19º', '19º'); - equal(moment([2011, 0, 20]).format('DDDo'), '20º', '20º'); + equal(moment([2011, 0, 11]).format('DDDo'), '11.', '11.'); + equal(moment([2011, 0, 12]).format('DDDo'), '12.', '12.'); + equal(moment([2011, 0, 13]).format('DDDo'), '13.', '13.'); + equal(moment([2011, 0, 14]).format('DDDo'), '14.', '14.'); + equal(moment([2011, 0, 15]).format('DDDo'), '15.', '15.'); + equal(moment([2011, 0, 16]).format('DDDo'), '16.', '16.'); + equal(moment([2011, 0, 17]).format('DDDo'), '17.', '17.'); + equal(moment([2011, 0, 18]).format('DDDo'), '18.', '18.'); + equal(moment([2011, 0, 19]).format('DDDo'), '19.', '19.'); + equal(moment([2011, 0, 20]).format('DDDo'), '20.', '20.'); - equal(moment([2011, 0, 21]).format('DDDo'), '21º', '21º'); - equal(moment([2011, 0, 22]).format('DDDo'), '22º', '22º'); - equal(moment([2011, 0, 23]).format('DDDo'), '23º', '23º'); - equal(moment([2011, 0, 24]).format('DDDo'), '24º', '24º'); - equal(moment([2011, 0, 25]).format('DDDo'), '25º', '25º'); - equal(moment([2011, 0, 26]).format('DDDo'), '26º', '26º'); - equal(moment([2011, 0, 27]).format('DDDo'), '27º', '27º'); - equal(moment([2011, 0, 28]).format('DDDo'), '28º', '28º'); - equal(moment([2011, 0, 29]).format('DDDo'), '29º', '29º'); - equal(moment([2011, 0, 30]).format('DDDo'), '30º', '30º'); + equal(moment([2011, 0, 21]).format('DDDo'), '21.', '21.'); + equal(moment([2011, 0, 22]).format('DDDo'), '22.', '22.'); + equal(moment([2011, 0, 23]).format('DDDo'), '23.', '23.'); + equal(moment([2011, 0, 24]).format('DDDo'), '24.', '24.'); + equal(moment([2011, 0, 25]).format('DDDo'), '25.', '25.'); + equal(moment([2011, 0, 26]).format('DDDo'), '26.', '26.'); + equal(moment([2011, 0, 27]).format('DDDo'), '27.', '27.'); + equal(moment([2011, 0, 28]).format('DDDo'), '28.', '28.'); + equal(moment([2011, 0, 29]).format('DDDo'), '29.', '29.'); + equal(moment([2011, 0, 30]).format('DDDo'), '30.', '30.'); - equal(moment([2011, 0, 31]).format('DDDo'), '31º', '31º'); + equal(moment([2011, 0, 31]).format('DDDo'), '31.', '31.'); }); test("format month", 12, function() { - moment.lang('gl'); - var expected = "Xaneiro Xan._Febreiro Feb._Marzo Mar._Abril Abr._Maio Mai._Xuño Xuñ._Xullo Xul._Agosto Ago._Setembro Set._Octubro Out._Novembro Nov._Decembro Dec.".split("_"); + moment.lang('eu'); + var expected = 'urtarrila urt._otsaila ots._martxoa mar._apirila api._maiatza mai._ekaina eka._uztaila uzt._abuztua abu._iraila ira._urria urr._azaroa aza._abendua abe.'.split("_"); var i; for (i = 0; i < expected.length; i++) { equal(moment([2011, i, 0]).format('MMMM MMM'), expected[i], expected[i]); @@ -929,9 +1155,8 @@ test("format month", 12, function() { }); test("format week", 7, function() { - moment.lang('gl'); - var expected = "Domingo Dom._Luns Lun._Martes Mar._Mércores Mér._Xoves Xov._Venres Ven._Sábado Sáb.".split("_"); - + moment.lang('eu'); + var expected = 'igandea ig._astelehena al._asteartea ar._asteazkena az._osteguna og._ostirala ol._larunbata lr.'.split("_"); var i; for (i = 0; i < expected.length; i++) { equal(moment([2011, 0, 2 + i]).format('dddd ddd'), expected[i], expected[i]); @@ -939,232 +1164,7 @@ test("format week", 7, function() { }); test("from", 30, function() { - moment.lang('gl'); - var start = moment([2007, 1, 28]); - - equal(start.from(moment([2007, 1, 28]).add({s:44}), true), "uns segundo", "44 seconds = a few seconds"); - equal(start.from(moment([2007, 1, 28]).add({s:45}), true), "un minuto", "45 seconds = a minute"); - equal(start.from(moment([2007, 1, 28]).add({s:89}), true), "un minuto", "89 seconds = a minute"); - equal(start.from(moment([2007, 1, 28]).add({s:90}), true), "2 minutos", "90 seconds = 2 minutes"); - equal(start.from(moment([2007, 1, 28]).add({m:44}), true), "44 minutos", "44 minutes = 44 minutes"); - equal(start.from(moment([2007, 1, 28]).add({m:45}), true), "unha hora", "45 minutes = an hour"); - equal(start.from(moment([2007, 1, 28]).add({m:89}), true), "unha hora", "89 minutes = an hour"); - equal(start.from(moment([2007, 1, 28]).add({m:90}), true), "2 horas", "90 minutes = 2 hours"); - equal(start.from(moment([2007, 1, 28]).add({h:5}), true), "5 horas", "5 hours = 5 hours"); - equal(start.from(moment([2007, 1, 28]).add({h:21}), true), "21 horas", "21 hours = 21 hours"); - equal(start.from(moment([2007, 1, 28]).add({h:22}), true), "un día", "22 hours = a day"); - equal(start.from(moment([2007, 1, 28]).add({h:35}), true), "un día", "35 hours = a day"); - equal(start.from(moment([2007, 1, 28]).add({h:36}), true), "2 días", "36 hours = 2 days"); - equal(start.from(moment([2007, 1, 28]).add({d:1}), true), "un día", "1 day = a day"); - equal(start.from(moment([2007, 1, 28]).add({d:5}), true), "5 días", "5 days = 5 days"); - equal(start.from(moment([2007, 1, 28]).add({d:25}), true), "25 días", "25 days = 25 days"); - equal(start.from(moment([2007, 1, 28]).add({d:26}), true), "un mes", "26 days = a month"); - equal(start.from(moment([2007, 1, 28]).add({d:30}), true), "un mes", "30 days = a month"); - equal(start.from(moment([2007, 1, 28]).add({d:45}), true), "un mes", "45 days = a month"); - equal(start.from(moment([2007, 1, 28]).add({d:46}), true), "2 meses", "46 days = 2 months"); - equal(start.from(moment([2007, 1, 28]).add({d:74}), true), "2 meses", "75 days = 2 months"); - equal(start.from(moment([2007, 1, 28]).add({d:76}), true), "3 meses", "76 days = 3 months"); - equal(start.from(moment([2007, 1, 28]).add({M:1}), true), "un mes", "1 month = a month"); - equal(start.from(moment([2007, 1, 28]).add({M:5}), true), "5 meses", "5 months = 5 months"); - equal(start.from(moment([2007, 1, 28]).add({d:344}), true), "11 meses", "344 days = 11 months"); - equal(start.from(moment([2007, 1, 28]).add({d:345}), true), "un ano", "345 days = a year"); - equal(start.from(moment([2007, 1, 28]).add({d:547}), true), "un ano", "547 days = a year"); - equal(start.from(moment([2007, 1, 28]).add({d:548}), true), "2 anos", "548 days = 2 years"); - equal(start.from(moment([2007, 1, 28]).add({y:1}), true), "un ano", "1 year = a year"); - equal(start.from(moment([2007, 1, 28]).add({y:5}), true), "5 anos", "5 years = 5 years"); -}); - -test("suffix", 2, function() { - moment.lang('gl'); - equal(moment(30000).from(0), "en uns segundo", "prefix"); - equal(moment(0).from(30000), "fai uns segundo", "suffix"); -}); - - -test("now from now", 1, function() { - moment.lang('gl'); - equal(moment().fromNow(), "fai uns segundo", "now from now should display as in the past"); -}); - - -test("fromNow", 2, function() { - moment.lang('gl'); - equal(moment().add({s:30}).fromNow(), "en uns segundo", "en unos segundos"); - equal(moment().add({d:5}).fromNow(), "en 5 días", "en 5 días"); -}); - - -test("calendar day", 7, function() { - moment.lang('gl'); - - var a = moment().hours(2).minutes(0).seconds(0); - - equal(moment(a).calendar(), "hoxe ás 2:00", "today at the same time"); - equal(moment(a).add({ m: 25 }).calendar(), "hoxe ás 2:25", "Now plus 25 min"); - equal(moment(a).add({ h: 1 }).calendar(), "hoxe ás 3:00", "Now plus 1 hour"); - equal(moment(a).add({ d: 1 }).calendar(), "mañá ás 2:00", "tomorrow at the same time"); - equal(moment(a).add({ d: 1, h : -1 }).calendar(), "mañá a 1:00", "tomorrow minus 1 hour"); - equal(moment(a).subtract({ h: 1 }).calendar(), "hoxe a 1:00", "Now minus 1 hour"); - equal(moment(a).subtract({ d: 1 }).calendar(), "onte á 2:00", "yesterday at the same time"); -}); - -test("calendar next week", 15, function() { - moment.lang('gl'); - - var i; - var m; - - for (i = 2; i < 7; i++) { - m = moment().add({ d: i }); - equal(m.calendar(), m.format('dddd [' + ((m.hours() !== 1) ? 'ás' : 'a') + '] LT'), "Today + " + i + " days current time"); - m.hours(0).minutes(0).seconds(0).milliseconds(0); - equal(m.calendar(), m.format('dddd [' + ((m.hours() !== 1) ? 'ás' : 'a') + '] LT'), "Today + " + i + " days beginning of day"); - m.hours(23).minutes(59).seconds(59).milliseconds(999); - equal(m.calendar(), m.format('dddd [' + ((m.hours() !== 1) ? 'ás' : 'a') + '] LT'), "Today + " + i + " days end of day"); - } -}); - -test("calendar last week", 15, function() { - moment.lang('gl'); - - for (i = 2; i < 7; i++) { - m = moment().subtract({ d: i }); - equal(m.calendar(), m.format('[o] dddd [pasado ' + ((m.hours() !== 1) ? 'ás' : 'a') + '] LT'), "Today - " + i + " days current time"); - m.hours(0).minutes(0).seconds(0).milliseconds(0); - equal(m.calendar(), m.format('[o] dddd [pasado ' + ((m.hours() !== 1) ? 'ás' : 'a') + '] LT'), "Today - " + i + " days beginning of day"); - m.hours(23).minutes(59).seconds(59).milliseconds(999); - equal(m.calendar(), m.format('[o] dddd [pasado ' + ((m.hours() !== 1) ? 'ás' : 'a') + '] LT'), "Today - " + i + " days end of day"); - } -}); - -test("calendar all else", 4, function() { - moment.lang('gl'); - var weeksAgo = moment().subtract({ w: 1 }); - var weeksFromNow = moment().add({ w: 1 }); - - equal(weeksAgo.calendar(), weeksAgo.format('L'), "1 week ago"); - equal(weeksFromNow.calendar(), weeksFromNow.format('L'), "in 1 week"); - - weeksAgo = moment().subtract({ w: 2 }); - weeksFromNow = moment().add({ w: 2 }); - - equal(weeksAgo.calendar(), weeksAgo.format('L'), "2 weeks ago"); - equal(weeksFromNow.calendar(), weeksFromNow.format('L'), "in 2 weeks"); -}); - -/************************************************** - Euskara - *************************************************/ - -module("lang:eu"); - -test("parse", 96, function() { - moment.lang('eu'); - var tests = 'urtarrila urt._otsaila ots._martxoa mar._apirila api._maiatza mai._ekaina eka._uztaila uzt._abuztua abu._iraila ira._urria urr._azaroa aza._abendua abe.'.split("_"); - var i; - function equalTest(input, mmm, i) { - equal(moment(input, mmm).month(), i, input + ' should be month ' + (i + 1)); - } - for (i = 0; i < 12; i++) { - tests[i] = tests[i].split(' '); - equalTest(tests[i][0], 'MMM', i); - equalTest(tests[i][1], 'MMM', i); - equalTest(tests[i][0], 'MMMM', i); - equalTest(tests[i][1], 'MMMM', i); - equalTest(tests[i][0].toLocaleLowerCase(), 'MMMM', i); - equalTest(tests[i][1].toLocaleLowerCase(), 'MMMM', i); - equalTest(tests[i][0].toLocaleUpperCase(), 'MMMM', i); - equalTest(tests[i][1].toLocaleUpperCase(), 'MMMM', i); - } -}); - -test("format", 18, function() { - moment.lang('eu'); - var a = [ - ['dddd, MMMM Do YYYY, h:mm:ss a', 'igandea, otsaila 14. 2010, 3:25:50 pm'], - ['ddd, hA', 'ig., 3PM'], - ['M Mo MM MMMM MMM', '2 2. 02 otsaila ots.'], - ['YYYY YY', '2010 10'], - ['D Do DD', '14 14. 14'], - ['d do dddd ddd', '0 0. igandea ig.'], - ['DDD DDDo DDDD', '45 45. 045'], - ['w wo ww', '8 8. 08'], - ['h hh', '3 03'], - ['H HH', '15 15'], - ['m mm', '25 25'], - ['s ss', '50 50'], - ['a A', 'pm PM'], - ['t\\he DDDo \\d\\ay of t\\he ye\\ar', 'the 45. day of the year'], - ['L', '2010-02-14'], - ['LL', '2010ko otsailaren 14a'], - ['LLL', '2010ko otsailaren 14a 15:25'], - ['LLLL', 'igandea, 2010ko otsailaren 14a 15:25'] - ], - b = moment(new Date(2010, 1, 14, 15, 25, 50, 125)), - i; - for (i = 0; i < a.length; i++) { - equal(b.format(a[i][0]), a[i][1], a[i][0] + ' ---> ' + a[i][1]); - } -}); - -test("format ordinal", 31, function() { - moment.lang('eu'); - equal(moment([2011, 0, 1]).format('DDDo'), '1.', '1.'); - equal(moment([2011, 0, 2]).format('DDDo'), '2.', '2.'); - equal(moment([2011, 0, 3]).format('DDDo'), '3.', '3.'); - equal(moment([2011, 0, 4]).format('DDDo'), '4.', '4.'); - equal(moment([2011, 0, 5]).format('DDDo'), '5.', '5.'); - equal(moment([2011, 0, 6]).format('DDDo'), '6.', '6.'); - equal(moment([2011, 0, 7]).format('DDDo'), '7.', '7.'); - equal(moment([2011, 0, 8]).format('DDDo'), '8.', '8.'); - equal(moment([2011, 0, 9]).format('DDDo'), '9.', '9.'); - equal(moment([2011, 0, 10]).format('DDDo'), '10.', '10.'); - - equal(moment([2011, 0, 11]).format('DDDo'), '11.', '11.'); - equal(moment([2011, 0, 12]).format('DDDo'), '12.', '12.'); - equal(moment([2011, 0, 13]).format('DDDo'), '13.', '13.'); - equal(moment([2011, 0, 14]).format('DDDo'), '14.', '14.'); - equal(moment([2011, 0, 15]).format('DDDo'), '15.', '15.'); - equal(moment([2011, 0, 16]).format('DDDo'), '16.', '16.'); - equal(moment([2011, 0, 17]).format('DDDo'), '17.', '17.'); - equal(moment([2011, 0, 18]).format('DDDo'), '18.', '18.'); - equal(moment([2011, 0, 19]).format('DDDo'), '19.', '19.'); - equal(moment([2011, 0, 20]).format('DDDo'), '20.', '20.'); - - equal(moment([2011, 0, 21]).format('DDDo'), '21.', '21.'); - equal(moment([2011, 0, 22]).format('DDDo'), '22.', '22.'); - equal(moment([2011, 0, 23]).format('DDDo'), '23.', '23.'); - equal(moment([2011, 0, 24]).format('DDDo'), '24.', '24.'); - equal(moment([2011, 0, 25]).format('DDDo'), '25.', '25.'); - equal(moment([2011, 0, 26]).format('DDDo'), '26.', '26.'); - equal(moment([2011, 0, 27]).format('DDDo'), '27.', '27.'); - equal(moment([2011, 0, 28]).format('DDDo'), '28.', '28.'); - equal(moment([2011, 0, 29]).format('DDDo'), '29.', '29.'); - equal(moment([2011, 0, 30]).format('DDDo'), '30.', '30.'); - - equal(moment([2011, 0, 31]).format('DDDo'), '31.', '31.'); -}); - -test("format month", 12, function() { - moment.lang('eu'); - var expected = 'urtarrila urt._otsaila ots._martxoa mar._apirila api._maiatza mai._ekaina eka._uztaila uzt._abuztua abu._iraila ira._urria urr._azaroa aza._abendua abe.'.split("_"); - var i; - for (i = 0; i < expected.length; i++) { - equal(moment([2011, i, 0]).format('MMMM MMM'), expected[i], expected[i]); - } -}); - -test("format week", 7, function() { - moment.lang('eu'); - var expected = 'igandea ig._astelehena al._asteartea ar._asteazkena az._osteguna og._ostirala ol._larunbata lr.'.split("_"); - var i; - for (i = 0; i < expected.length; i++) { - equal(moment([2011, 0, 2 + i]).format('dddd ddd'), expected[i], expected[i]); - } -}); - -test("from", 30, function() { - moment.lang('eu'); + moment.lang('eu'); var start = moment([2007, 1, 28]); equal(start.from(moment([2007, 1, 28]).add({s:44}), true), "segundo batzuk", "44 seconds = a few seconds"); equal(start.from(moment([2007, 1, 28]).add({s:45}), true), "minutu bat", "45 seconds = a minute"); @@ -1490,6 +1490,204 @@ test("same all else", 4, function() { equal(weeksFromNow.calendar(), weeksFromNow.format('L'), "in 2 weeks"); }); +/************************************************** + Galego + *************************************************/ + +module("lang:gl"); + +test("parse", 96, function() { + moment.lang('gl'); + var tests = "Xaneiro Xan._Febreiro Feb._Marzo Mar._Abril Abr._Maio Mai._Xuño Xuñ._Xullo Xul._Agosto Ago._Setembro Set._Octubro Out._Novembro Nov._Decembro Dec.".split("_"); + + var i; + function equalTest(input, mmm, i) { + equal(moment(input, mmm).month(), i, input + ' should be month ' + (i + 1)); + } + for (i = 0; i < 12; i++) { + tests[i] = tests[i].split(' '); + equalTest(tests[i][0], 'MMM', i); + equalTest(tests[i][1], 'MMM', i); + equalTest(tests[i][0], 'MMMM', i); + equalTest(tests[i][1], 'MMMM', i); + equalTest(tests[i][0].toLocaleLowerCase(), 'MMMM', i); + equalTest(tests[i][1].toLocaleLowerCase(), 'MMMM', i); + equalTest(tests[i][0].toLocaleUpperCase(), 'MMMM', i); + equalTest(tests[i][1].toLocaleUpperCase(), 'MMMM', i); + } +}); + +test("format ordinal", 31, function() { + moment.lang('es'); + equal(moment([2011, 0, 1]).format('DDDo'), '1º', '1º'); + equal(moment([2011, 0, 2]).format('DDDo'), '2º', '2º'); + equal(moment([2011, 0, 3]).format('DDDo'), '3º', '3º'); + equal(moment([2011, 0, 4]).format('DDDo'), '4º', '4º'); + equal(moment([2011, 0, 5]).format('DDDo'), '5º', '5º'); + equal(moment([2011, 0, 6]).format('DDDo'), '6º', '6º'); + equal(moment([2011, 0, 7]).format('DDDo'), '7º', '7º'); + equal(moment([2011, 0, 8]).format('DDDo'), '8º', '8º'); + equal(moment([2011, 0, 9]).format('DDDo'), '9º', '9º'); + equal(moment([2011, 0, 10]).format('DDDo'), '10º', '10º'); + + equal(moment([2011, 0, 11]).format('DDDo'), '11º', '11º'); + equal(moment([2011, 0, 12]).format('DDDo'), '12º', '12º'); + equal(moment([2011, 0, 13]).format('DDDo'), '13º', '13º'); + equal(moment([2011, 0, 14]).format('DDDo'), '14º', '14º'); + equal(moment([2011, 0, 15]).format('DDDo'), '15º', '15º'); + equal(moment([2011, 0, 16]).format('DDDo'), '16º', '16º'); + equal(moment([2011, 0, 17]).format('DDDo'), '17º', '17º'); + equal(moment([2011, 0, 18]).format('DDDo'), '18º', '18º'); + equal(moment([2011, 0, 19]).format('DDDo'), '19º', '19º'); + equal(moment([2011, 0, 20]).format('DDDo'), '20º', '20º'); + + equal(moment([2011, 0, 21]).format('DDDo'), '21º', '21º'); + equal(moment([2011, 0, 22]).format('DDDo'), '22º', '22º'); + equal(moment([2011, 0, 23]).format('DDDo'), '23º', '23º'); + equal(moment([2011, 0, 24]).format('DDDo'), '24º', '24º'); + equal(moment([2011, 0, 25]).format('DDDo'), '25º', '25º'); + equal(moment([2011, 0, 26]).format('DDDo'), '26º', '26º'); + equal(moment([2011, 0, 27]).format('DDDo'), '27º', '27º'); + equal(moment([2011, 0, 28]).format('DDDo'), '28º', '28º'); + equal(moment([2011, 0, 29]).format('DDDo'), '29º', '29º'); + equal(moment([2011, 0, 30]).format('DDDo'), '30º', '30º'); + + equal(moment([2011, 0, 31]).format('DDDo'), '31º', '31º'); +}); + +test("format month", 12, function() { + moment.lang('gl'); + var expected = "Xaneiro Xan._Febreiro Feb._Marzo Mar._Abril Abr._Maio Mai._Xuño Xuñ._Xullo Xul._Agosto Ago._Setembro Set._Octubro Out._Novembro Nov._Decembro Dec.".split("_"); + var i; + for (i = 0; i < expected.length; i++) { + equal(moment([2011, i, 0]).format('MMMM MMM'), expected[i], expected[i]); + } +}); + +test("format week", 7, function() { + moment.lang('gl'); + var expected = "Domingo Dom._Luns Lun._Martes Mar._Mércores Mér._Xoves Xov._Venres Ven._Sábado Sáb.".split("_"); + + var i; + for (i = 0; i < expected.length; i++) { + equal(moment([2011, 0, 2 + i]).format('dddd ddd'), expected[i], expected[i]); + } +}); + +test("from", 30, function() { + moment.lang('gl'); + var start = moment([2007, 1, 28]); + + equal(start.from(moment([2007, 1, 28]).add({s:44}), true), "uns segundo", "44 seconds = a few seconds"); + equal(start.from(moment([2007, 1, 28]).add({s:45}), true), "un minuto", "45 seconds = a minute"); + equal(start.from(moment([2007, 1, 28]).add({s:89}), true), "un minuto", "89 seconds = a minute"); + equal(start.from(moment([2007, 1, 28]).add({s:90}), true), "2 minutos", "90 seconds = 2 minutes"); + equal(start.from(moment([2007, 1, 28]).add({m:44}), true), "44 minutos", "44 minutes = 44 minutes"); + equal(start.from(moment([2007, 1, 28]).add({m:45}), true), "unha hora", "45 minutes = an hour"); + equal(start.from(moment([2007, 1, 28]).add({m:89}), true), "unha hora", "89 minutes = an hour"); + equal(start.from(moment([2007, 1, 28]).add({m:90}), true), "2 horas", "90 minutes = 2 hours"); + equal(start.from(moment([2007, 1, 28]).add({h:5}), true), "5 horas", "5 hours = 5 hours"); + equal(start.from(moment([2007, 1, 28]).add({h:21}), true), "21 horas", "21 hours = 21 hours"); + equal(start.from(moment([2007, 1, 28]).add({h:22}), true), "un día", "22 hours = a day"); + equal(start.from(moment([2007, 1, 28]).add({h:35}), true), "un día", "35 hours = a day"); + equal(start.from(moment([2007, 1, 28]).add({h:36}), true), "2 días", "36 hours = 2 days"); + equal(start.from(moment([2007, 1, 28]).add({d:1}), true), "un día", "1 day = a day"); + equal(start.from(moment([2007, 1, 28]).add({d:5}), true), "5 días", "5 days = 5 days"); + equal(start.from(moment([2007, 1, 28]).add({d:25}), true), "25 días", "25 days = 25 days"); + equal(start.from(moment([2007, 1, 28]).add({d:26}), true), "un mes", "26 days = a month"); + equal(start.from(moment([2007, 1, 28]).add({d:30}), true), "un mes", "30 days = a month"); + equal(start.from(moment([2007, 1, 28]).add({d:45}), true), "un mes", "45 days = a month"); + equal(start.from(moment([2007, 1, 28]).add({d:46}), true), "2 meses", "46 days = 2 months"); + equal(start.from(moment([2007, 1, 28]).add({d:74}), true), "2 meses", "75 days = 2 months"); + equal(start.from(moment([2007, 1, 28]).add({d:76}), true), "3 meses", "76 days = 3 months"); + equal(start.from(moment([2007, 1, 28]).add({M:1}), true), "un mes", "1 month = a month"); + equal(start.from(moment([2007, 1, 28]).add({M:5}), true), "5 meses", "5 months = 5 months"); + equal(start.from(moment([2007, 1, 28]).add({d:344}), true), "11 meses", "344 days = 11 months"); + equal(start.from(moment([2007, 1, 28]).add({d:345}), true), "un ano", "345 days = a year"); + equal(start.from(moment([2007, 1, 28]).add({d:547}), true), "un ano", "547 days = a year"); + equal(start.from(moment([2007, 1, 28]).add({d:548}), true), "2 anos", "548 days = 2 years"); + equal(start.from(moment([2007, 1, 28]).add({y:1}), true), "un ano", "1 year = a year"); + equal(start.from(moment([2007, 1, 28]).add({y:5}), true), "5 anos", "5 years = 5 years"); +}); + +test("suffix", 2, function() { + moment.lang('gl'); + equal(moment(30000).from(0), "en uns segundo", "prefix"); + equal(moment(0).from(30000), "fai uns segundo", "suffix"); +}); + + +test("now from now", 1, function() { + moment.lang('gl'); + equal(moment().fromNow(), "fai uns segundo", "now from now should display as in the past"); +}); + + +test("fromNow", 2, function() { + moment.lang('gl'); + equal(moment().add({s:30}).fromNow(), "en uns segundo", "en unos segundos"); + equal(moment().add({d:5}).fromNow(), "en 5 días", "en 5 días"); +}); + + +test("calendar day", 7, function() { + moment.lang('gl'); + + var a = moment().hours(2).minutes(0).seconds(0); + + equal(moment(a).calendar(), "hoxe ás 2:00", "today at the same time"); + equal(moment(a).add({ m: 25 }).calendar(), "hoxe ás 2:25", "Now plus 25 min"); + equal(moment(a).add({ h: 1 }).calendar(), "hoxe ás 3:00", "Now plus 1 hour"); + equal(moment(a).add({ d: 1 }).calendar(), "mañá ás 2:00", "tomorrow at the same time"); + equal(moment(a).add({ d: 1, h : -1 }).calendar(), "mañá a 1:00", "tomorrow minus 1 hour"); + equal(moment(a).subtract({ h: 1 }).calendar(), "hoxe a 1:00", "Now minus 1 hour"); + equal(moment(a).subtract({ d: 1 }).calendar(), "onte á 2:00", "yesterday at the same time"); +}); + +test("calendar next week", 15, function() { + moment.lang('gl'); + + var i; + var m; + + for (i = 2; i < 7; i++) { + m = moment().add({ d: i }); + equal(m.calendar(), m.format('dddd [' + ((m.hours() !== 1) ? 'ás' : 'a') + '] LT'), "Today + " + i + " days current time"); + m.hours(0).minutes(0).seconds(0).milliseconds(0); + equal(m.calendar(), m.format('dddd [' + ((m.hours() !== 1) ? 'ás' : 'a') + '] LT'), "Today + " + i + " days beginning of day"); + m.hours(23).minutes(59).seconds(59).milliseconds(999); + equal(m.calendar(), m.format('dddd [' + ((m.hours() !== 1) ? 'ás' : 'a') + '] LT'), "Today + " + i + " days end of day"); + } +}); + +test("calendar last week", 15, function() { + moment.lang('gl'); + + for (i = 2; i < 7; i++) { + m = moment().subtract({ d: i }); + equal(m.calendar(), m.format('[o] dddd [pasado ' + ((m.hours() !== 1) ? 'ás' : 'a') + '] LT'), "Today - " + i + " days current time"); + m.hours(0).minutes(0).seconds(0).milliseconds(0); + equal(m.calendar(), m.format('[o] dddd [pasado ' + ((m.hours() !== 1) ? 'ás' : 'a') + '] LT'), "Today - " + i + " days beginning of day"); + m.hours(23).minutes(59).seconds(59).milliseconds(999); + equal(m.calendar(), m.format('[o] dddd [pasado ' + ((m.hours() !== 1) ? 'ás' : 'a') + '] LT'), "Today - " + i + " days end of day"); + } +}); + +test("calendar all else", 4, function() { + moment.lang('gl'); + var weeksAgo = moment().subtract({ w: 1 }); + var weeksFromNow = moment().add({ w: 1 }); + + equal(weeksAgo.calendar(), weeksAgo.format('L'), "1 week ago"); + equal(weeksFromNow.calendar(), weeksFromNow.format('L'), "in 1 week"); + + weeksAgo = moment().subtract({ w: 2 }); + weeksFromNow = moment().add({ w: 2 }); + + equal(weeksAgo.calendar(), weeksAgo.format('L'), "2 weeks ago"); + equal(weeksFromNow.calendar(), weeksFromNow.format('L'), "in 2 weeks"); +}); + /************************************************** Italian *************************************************/