]> git.ipfire.org Git - thirdparty/moment.git/commitdiff
Modified french prefix, and fixed tests related to seconds
authorFélix Bellanger <felix.bellanger@gmail.com>
Thu, 20 Oct 2011 00:46:54 +0000 (02:46 +0200)
committerFélix Bellanger <felix.bellanger@gmail.com>
Thu, 20 Oct 2011 00:46:54 +0000 (02:46 +0200)
lang/all.min.js
lang/fr.js
lang/fr.min.js
test/lang.js
test/lang/en.js
test/lang/fr.js

index 375a6c585bbcf2297217c39dc5bee9fd4f45760f..299f978de8f2317bb8a2c9e7971889f26c550921 100644 (file)
@@ -1 +1 @@
-(function(){var a={months:"Janvier_Février_Mars_Avril_Mai_Juin_Juillet_Aout_Septembre_Octobre_Novembre_Décembre".split("_"),monthsShort:"Jan_Fev_Mar_Avr_Mai_Juin_Juil_Aou_Sep_Oct_Nov_Dec".split("_"),weekdays:"Dimanche_Lundi_Mardi_Mercredi_Jeudi_Vendredi_Samedi".split("_"),weekdaysShort:"Dim_Lun_Mar_Mer_Jeu_Ven_Sam".split("_"),relativeTime:{future:"in %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%100/10)===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("_"),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:"Janeiro_Fevereiro_Março_Abril_Maio_Junho_Julho_Agosto_Setembro_Outubro_Novembro_Dezembro".split("_"),monthsShort:"Jan_Feb_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("_"),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)}()
\ No newline at end of file
+(function(){var a={months:"Janvier_Février_Mars_Avril_Mai_Juin_Juillet_Aout_Septembre_Octobre_Novembre_Décembre".split("_"),monthsShort:"Jan_Fev_Mar_Avr_Mai_Juin_Juil_Aou_Sep_Oct_Nov_Dec".split("_"),weekdays:"Dimanche_Lundi_Mardi_Mercredi_Jeudi_Vendredi_Samedi".split("_"),weekdaysShort:"Dim_Lun_Mar_Mer_Jeu_Ven_Sam".split("_"),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%100/10)===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("_"),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:"Janeiro_Fevereiro_Março_Abril_Maio_Junho_Julho_Agosto_Setembro_Outubro_Novembro_Dezembro".split("_"),monthsShort:"Jan_Feb_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("_"),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)}()
\ No newline at end of file
index 763292c9880e135e41562a43c7d96ec7328974b4..dec0b61fc60973dcba5ff688ec55b167480b7ec3 100644 (file)
@@ -5,7 +5,7 @@
             weekdays : "Dimanche_Lundi_Mardi_Mercredi_Jeudi_Vendredi_Samedi".split("_"),
             weekdaysShort : "Dim_Lun_Mar_Mer_Jeu_Ven_Sam".split("_"),
             relativeTime : {
-                future : "in %s",
+                future : "dans %s",
                 past : "il y a %s",
                 s : "quelques secondes",
                 m : "une minute",
index 521069ba0185d3eea7af1ec04fe318df5362476d..6c12eafc688abf7fde0f5942945c359d5f2fd258 100644 (file)
@@ -1 +1 @@
-(function(){var a={months:"Janvier_Février_Mars_Avril_Mai_Juin_Juillet_Aout_Septembre_Octobre_Novembre_Décembre".split("_"),monthsShort:"Jan_Fev_Mar_Avr_Mai_Juin_Juil_Aou_Sep_Oct_Nov_Dec".split("_"),weekdays:"Dimanche_Lundi_Mardi_Mercredi_Jeudi_Vendredi_Samedi".split("_"),weekdaysShort:"Dim_Lun_Mar_Mer_Jeu_Ven_Sam".split("_"),relativeTime:{future:"in %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%100/10)===1?"er":"ème"}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("fr",a)})()
\ No newline at end of file
+(function(){var a={months:"Janvier_Février_Mars_Avril_Mai_Juin_Juillet_Aout_Septembre_Octobre_Novembre_Décembre".split("_"),monthsShort:"Jan_Fev_Mar_Avr_Mai_Juin_Juil_Aou_Sep_Oct_Nov_Dec".split("_"),weekdays:"Dimanche_Lundi_Mardi_Mercredi_Jeudi_Vendredi_Samedi".split("_"),weekdaysShort:"Dim_Lun_Mar_Mer_Jeu_Ven_Sam".split("_"),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%100/10)===1?"er":"ème"}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("fr",a)})()
\ No newline at end of file
index c92e2e1e0b2f6a0503c9a4625ddbbf345162d94f..9c4cbdb047418ece8146c89b79df230af2e394ea 100644 (file)
@@ -90,47 +90,47 @@ test("format week", 7, function() {
 test("from", 30, function() {
     moment.lang('en');
     var start = moment([2007, 1, 28]);
-    equal(start.from(moment([2007, 1, 28]).add({s:44}), true),  "seconds",    "44 seconds = seconds");
-    equal(start.from(moment([2007, 1, 28]).add({s:45}), true),  "a minute",   "45 seconds = a minute");
-    equal(start.from(moment([2007, 1, 28]).add({s:89}), true),  "a minute",   "89 seconds = a minute");
-    equal(start.from(moment([2007, 1, 28]).add({s:90}), true),  "2 minutes",  "90 seconds = 2 minutes");
-    equal(start.from(moment([2007, 1, 28]).add({m:44}), true),  "44 minutes", "44 minutes = 44 minutes");
-    equal(start.from(moment([2007, 1, 28]).add({m:45}), true),  "an hour",    "45 minutes = an hour");
-    equal(start.from(moment([2007, 1, 28]).add({m:89}), true),  "an hour",    "89 minutes = an hour");
-    equal(start.from(moment([2007, 1, 28]).add({m:90}), true),  "2 hours",    "90 minutes = 2 hours");
-    equal(start.from(moment([2007, 1, 28]).add({h:5}), true),   "5 hours",    "5 hours = 5 hours");
-    equal(start.from(moment([2007, 1, 28]).add({h:21}), true),  "21 hours",   "21 hours = 21 hours");
-    equal(start.from(moment([2007, 1, 28]).add({h:22}), true),  "a day",      "22 hours = a day");
-    equal(start.from(moment([2007, 1, 28]).add({h:35}), true),  "a day",      "35 hours = a day");
-    equal(start.from(moment([2007, 1, 28]).add({h:36}), true),  "2 days",     "36 hours = 2 days");
-    equal(start.from(moment([2007, 1, 28]).add({d:1}), true),   "a day",      "1 day = a day");
-    equal(start.from(moment([2007, 1, 28]).add({d:5}), true),   "5 days",     "5 days = 5 days");
-    equal(start.from(moment([2007, 1, 28]).add({d:25}), true),  "25 days",    "25 days = 25 days");
-    equal(start.from(moment([2007, 1, 28]).add({d:26}), true),  "a month",    "26 days = a month");
-    equal(start.from(moment([2007, 1, 28]).add({d:30}), true),  "a month",    "30 days = a month");
-    equal(start.from(moment([2007, 1, 28]).add({d:45}), true),  "a month",    "45 days = a month");
-    equal(start.from(moment([2007, 1, 28]).add({d:46}), true),  "2 months",   "46 days = 2 months");
-    equal(start.from(moment([2007, 1, 28]).add({d:75}), true),  "2 months",   "75 days = 2 months");
-    equal(start.from(moment([2007, 1, 28]).add({d:76}), true),  "3 months",   "76 days = 3 months");
-    equal(start.from(moment([2007, 1, 28]).add({M:1}), true),   "a month",    "1 month = a month");
-    equal(start.from(moment([2007, 1, 28]).add({M:5}), true),   "5 months",   "5 months = 5 months");
-    equal(start.from(moment([2007, 1, 28]).add({d:344}), true), "11 months",  "344 days = 11 months");
-    equal(start.from(moment([2007, 1, 28]).add({d:345}), true), "a year",     "345 days = a year");
-    equal(start.from(moment([2007, 1, 28]).add({d:547}), true), "a year",     "547 days = a year");
-    equal(start.from(moment([2007, 1, 28]).add({d:548}), true), "2 years",    "548 days = 2 years");
-    equal(start.from(moment([2007, 1, 28]).add({y:1}), true),   "a year",     "1 year = a year");
-    equal(start.from(moment([2007, 1, 28]).add({y:5}), true),   "5 years",    "5 years = 5 years");
+    equal(start.from(moment([2007, 1, 28]).add({s:44}), true),  "a few seconds", "44 seconds = a few seconds");
+    equal(start.from(moment([2007, 1, 28]).add({s:45}), true),  "a minute",      "45 seconds = a minute");
+    equal(start.from(moment([2007, 1, 28]).add({s:89}), true),  "a minute",      "89 seconds = a minute");
+    equal(start.from(moment([2007, 1, 28]).add({s:90}), true),  "2 minutes",     "90 seconds = 2 minutes");
+    equal(start.from(moment([2007, 1, 28]).add({m:44}), true),  "44 minutes",    "44 minutes = 44 minutes");
+    equal(start.from(moment([2007, 1, 28]).add({m:45}), true),  "an hour",       "45 minutes = an hour");
+    equal(start.from(moment([2007, 1, 28]).add({m:89}), true),  "an hour",       "89 minutes = an hour");
+    equal(start.from(moment([2007, 1, 28]).add({m:90}), true),  "2 hours",       "90 minutes = 2 hours");
+    equal(start.from(moment([2007, 1, 28]).add({h:5}), true),   "5 hours",       "5 hours = 5 hours");
+    equal(start.from(moment([2007, 1, 28]).add({h:21}), true),  "21 hours",      "21 hours = 21 hours");
+    equal(start.from(moment([2007, 1, 28]).add({h:22}), true),  "a day",         "22 hours = a day");
+    equal(start.from(moment([2007, 1, 28]).add({h:35}), true),  "a day",         "35 hours = a day");
+    equal(start.from(moment([2007, 1, 28]).add({h:36}), true),  "2 days",        "36 hours = 2 days");
+    equal(start.from(moment([2007, 1, 28]).add({d:1}), true),   "a day",         "1 day = a day");
+    equal(start.from(moment([2007, 1, 28]).add({d:5}), true),   "5 days",        "5 days = 5 days");
+    equal(start.from(moment([2007, 1, 28]).add({d:25}), true),  "25 days",       "25 days = 25 days");
+    equal(start.from(moment([2007, 1, 28]).add({d:26}), true),  "a month",       "26 days = a month");
+    equal(start.from(moment([2007, 1, 28]).add({d:30}), true),  "a month",       "30 days = a month");
+    equal(start.from(moment([2007, 1, 28]).add({d:45}), true),  "a month",       "45 days = a month");
+    equal(start.from(moment([2007, 1, 28]).add({d:46}), true),  "2 months",      "46 days = 2 months");
+    equal(start.from(moment([2007, 1, 28]).add({d:75}), true),  "2 months",      "75 days = 2 months");
+    equal(start.from(moment([2007, 1, 28]).add({d:76}), true),  "3 months",      "76 days = 3 months");
+    equal(start.from(moment([2007, 1, 28]).add({M:1}), true),   "a month",       "1 month = a month");
+    equal(start.from(moment([2007, 1, 28]).add({M:5}), true),   "5 months",      "5 months = 5 months");
+    equal(start.from(moment([2007, 1, 28]).add({d:344}), true), "11 months",     "344 days = 11 months");
+    equal(start.from(moment([2007, 1, 28]).add({d:345}), true), "a year",        "345 days = a year");
+    equal(start.from(moment([2007, 1, 28]).add({d:547}), true), "a year",        "547 days = a year");
+    equal(start.from(moment([2007, 1, 28]).add({d:548}), true), "2 years",       "548 days = 2 years");
+    equal(start.from(moment([2007, 1, 28]).add({y:1}), true),   "a year",        "1 year = a year");
+    equal(start.from(moment([2007, 1, 28]).add({y:5}), true),   "5 years",       "5 years = 5 years");
 });
 
 test("suffix", 2, function() {
     moment.lang('en');
-    equal(moment(30000).from(0), "in seconds", "prefix");
-    equal(moment(0).from(30000), "seconds ago", "suffix");
+    equal(moment(30000).from(0), "in a few seconds",  "prefix");
+    equal(moment(0).from(30000), "a few seconds ago", "suffix");
 });
 
 test("fromNow", 2, function() {
     moment.lang('en');
-    equal(moment().add({s:30}).fromNow(), "in seconds", "in seconds");
+    equal(moment().add({s:30}).fromNow(), "in a few seconds", "in a few seconds");
     equal(moment().add({d:5}).fromNow(), "in 5 days", "in 5 days");
 });
 
@@ -225,7 +225,7 @@ test("format week", 7, function() {
 test("from", 30, function() {
     moment.lang('fr');
     var start = moment([2007, 1, 28]);
-    equal(start.from(moment([2007, 1, 28]).add({s:44}), true),  "secondes",    "44 seconds = seconds");
+    equal(start.from(moment([2007, 1, 28]).add({s:44}), true),  "quelques secondes", "44 seconds = a few seconds");
     equal(start.from(moment([2007, 1, 28]).add({s:45}), true),  "une minute",   "45 seconds = a minute");
     equal(start.from(moment([2007, 1, 28]).add({s:89}), true),  "une minute",   "89 seconds = a minute");
     equal(start.from(moment([2007, 1, 28]).add({s:90}), true),  "2 minutes",  "90 seconds = 2 minutes");
@@ -259,14 +259,14 @@ test("from", 30, function() {
 
 test("suffix", 2, function() {
     moment.lang('fr');
-    equal(moment(30000).from(0), "in secondes", "prefix");
-    equal(moment(0).from(30000), "il y a secondes", "suffix");
+    equal(moment(30000).from(0), "dans quelques secondes", "prefix");
+    equal(moment(0).from(30000), "il y a quelques secondes", "suffix");
 });
 
 test("fromNow", 2, function() {
     moment.lang('fr');
-    equal(moment().add({s:30}).fromNow(), "in secondes", "in seconds");
-    equal(moment().add({d:5}).fromNow(), "in 5 jours", "in 5 days");
+    equal(moment().add({s:30}).fromNow(), "dans quelques secondes", "in a few seconds");
+    equal(moment().add({d:5}).fromNow(), "dans 5 jours", "in 5 days");
 });
 /**************************************************
   Italian
index 77f7451c65c36854e985a119d322cf4e3d61a22b..ff08bec77fbe77376c850d3ba249c9052d154646 100644 (file)
@@ -90,46 +90,46 @@ test("format week", 7, function() {
 test("from", 30, function() {
     moment.lang('en');
     var start = moment([2007, 1, 28]);
-    equal(start.from(moment([2007, 1, 28]).add({s:44}), true),  "seconds",    "44 seconds = seconds");
-    equal(start.from(moment([2007, 1, 28]).add({s:45}), true),  "a minute",   "45 seconds = a minute");
-    equal(start.from(moment([2007, 1, 28]).add({s:89}), true),  "a minute",   "89 seconds = a minute");
-    equal(start.from(moment([2007, 1, 28]).add({s:90}), true),  "2 minutes",  "90 seconds = 2 minutes");
-    equal(start.from(moment([2007, 1, 28]).add({m:44}), true),  "44 minutes", "44 minutes = 44 minutes");
-    equal(start.from(moment([2007, 1, 28]).add({m:45}), true),  "an hour",    "45 minutes = an hour");
-    equal(start.from(moment([2007, 1, 28]).add({m:89}), true),  "an hour",    "89 minutes = an hour");
-    equal(start.from(moment([2007, 1, 28]).add({m:90}), true),  "2 hours",    "90 minutes = 2 hours");
-    equal(start.from(moment([2007, 1, 28]).add({h:5}), true),   "5 hours",    "5 hours = 5 hours");
-    equal(start.from(moment([2007, 1, 28]).add({h:21}), true),  "21 hours",   "21 hours = 21 hours");
-    equal(start.from(moment([2007, 1, 28]).add({h:22}), true),  "a day",      "22 hours = a day");
-    equal(start.from(moment([2007, 1, 28]).add({h:35}), true),  "a day",      "35 hours = a day");
-    equal(start.from(moment([2007, 1, 28]).add({h:36}), true),  "2 days",     "36 hours = 2 days");
-    equal(start.from(moment([2007, 1, 28]).add({d:1}), true),   "a day",      "1 day = a day");
-    equal(start.from(moment([2007, 1, 28]).add({d:5}), true),   "5 days",     "5 days = 5 days");
-    equal(start.from(moment([2007, 1, 28]).add({d:25}), true),  "25 days",    "25 days = 25 days");
-    equal(start.from(moment([2007, 1, 28]).add({d:26}), true),  "a month",    "26 days = a month");
-    equal(start.from(moment([2007, 1, 28]).add({d:30}), true),  "a month",    "30 days = a month");
-    equal(start.from(moment([2007, 1, 28]).add({d:45}), true),  "a month",    "45 days = a month");
-    equal(start.from(moment([2007, 1, 28]).add({d:46}), true),  "2 months",   "46 days = 2 months");
-    equal(start.from(moment([2007, 1, 28]).add({d:75}), true),  "2 months",   "75 days = 2 months");
-    equal(start.from(moment([2007, 1, 28]).add({d:76}), true),  "3 months",   "76 days = 3 months");
-    equal(start.from(moment([2007, 1, 28]).add({M:1}), true),   "a month",    "1 month = a month");
-    equal(start.from(moment([2007, 1, 28]).add({M:5}), true),   "5 months",   "5 months = 5 months");
-    equal(start.from(moment([2007, 1, 28]).add({d:344}), true), "11 months",  "344 days = 11 months");
-    equal(start.from(moment([2007, 1, 28]).add({d:345}), true), "a year",     "345 days = a year");
-    equal(start.from(moment([2007, 1, 28]).add({d:547}), true), "a year",     "547 days = a year");
-    equal(start.from(moment([2007, 1, 28]).add({d:548}), true), "2 years",    "548 days = 2 years");
-    equal(start.from(moment([2007, 1, 28]).add({y:1}), true),   "a year",     "1 year = a year");
-    equal(start.from(moment([2007, 1, 28]).add({y:5}), true),   "5 years",    "5 years = 5 years");
+    equal(start.from(moment([2007, 1, 28]).add({s:44}), true),  "a few seconds", "44 seconds = a few seconds");
+    equal(start.from(moment([2007, 1, 28]).add({s:45}), true),  "a minute",      "45 seconds = a minute");
+    equal(start.from(moment([2007, 1, 28]).add({s:89}), true),  "a minute",      "89 seconds = a minute");
+    equal(start.from(moment([2007, 1, 28]).add({s:90}), true),  "2 minutes",     "90 seconds = 2 minutes");
+    equal(start.from(moment([2007, 1, 28]).add({m:44}), true),  "44 minutes",    "44 minutes = 44 minutes");
+    equal(start.from(moment([2007, 1, 28]).add({m:45}), true),  "an hour",       "45 minutes = an hour");
+    equal(start.from(moment([2007, 1, 28]).add({m:89}), true),  "an hour",       "89 minutes = an hour");
+    equal(start.from(moment([2007, 1, 28]).add({m:90}), true),  "2 hours",       "90 minutes = 2 hours");
+    equal(start.from(moment([2007, 1, 28]).add({h:5}), true),   "5 hours",       "5 hours = 5 hours");
+    equal(start.from(moment([2007, 1, 28]).add({h:21}), true),  "21 hours",      "21 hours = 21 hours");
+    equal(start.from(moment([2007, 1, 28]).add({h:22}), true),  "a day",         "22 hours = a day");
+    equal(start.from(moment([2007, 1, 28]).add({h:35}), true),  "a day",         "35 hours = a day");
+    equal(start.from(moment([2007, 1, 28]).add({h:36}), true),  "2 days",        "36 hours = 2 days");
+    equal(start.from(moment([2007, 1, 28]).add({d:1}), true),   "a day",         "1 day = a day");
+    equal(start.from(moment([2007, 1, 28]).add({d:5}), true),   "5 days",        "5 days = 5 days");
+    equal(start.from(moment([2007, 1, 28]).add({d:25}), true),  "25 days",       "25 days = 25 days");
+    equal(start.from(moment([2007, 1, 28]).add({d:26}), true),  "a month",       "26 days = a month");
+    equal(start.from(moment([2007, 1, 28]).add({d:30}), true),  "a month",       "30 days = a month");
+    equal(start.from(moment([2007, 1, 28]).add({d:45}), true),  "a month",       "45 days = a month");
+    equal(start.from(moment([2007, 1, 28]).add({d:46}), true),  "2 months",      "46 days = 2 months");
+    equal(start.from(moment([2007, 1, 28]).add({d:75}), true),  "2 months",      "75 days = 2 months");
+    equal(start.from(moment([2007, 1, 28]).add({d:76}), true),  "3 months",      "76 days = 3 months");
+    equal(start.from(moment([2007, 1, 28]).add({M:1}), true),   "a month",       "1 month = a month");
+    equal(start.from(moment([2007, 1, 28]).add({M:5}), true),   "5 months",      "5 months = 5 months");
+    equal(start.from(moment([2007, 1, 28]).add({d:344}), true), "11 months",     "344 days = 11 months");
+    equal(start.from(moment([2007, 1, 28]).add({d:345}), true), "a year",        "345 days = a year");
+    equal(start.from(moment([2007, 1, 28]).add({d:547}), true), "a year",        "547 days = a year");
+    equal(start.from(moment([2007, 1, 28]).add({d:548}), true), "2 years",       "548 days = 2 years");
+    equal(start.from(moment([2007, 1, 28]).add({y:1}), true),   "a year",        "1 year = a year");
+    equal(start.from(moment([2007, 1, 28]).add({y:5}), true),   "5 years",       "5 years = 5 years");
 });
 
 test("suffix", 2, function() {
     moment.lang('en');
-    equal(moment(30000).from(0), "in seconds", "prefix");
-    equal(moment(0).from(30000), "seconds ago", "suffix");
+    equal(moment(30000).from(0), "in a few seconds",  "prefix");
+    equal(moment(0).from(30000), "a few seconds ago", "suffix");
 });
 
 test("fromNow", 2, function() {
     moment.lang('en');
-    equal(moment().add({s:30}).fromNow(), "in seconds", "in seconds");
+    equal(moment().add({s:30}).fromNow(), "in a few seconds", "in a few seconds");
     equal(moment().add({d:5}).fromNow(), "in 5 days", "in 5 days");
 });
index d8c54c6a095b6624d48c9e896e01c22e74b8a9f5..904f78d8d0cd1374d96f51a737feec2bd2deaf63 100644 (file)
@@ -90,7 +90,7 @@ test("format week", 7, function() {
 test("from", 30, function() {
     moment.lang('fr');
     var start = moment([2007, 1, 28]);
-    equal(start.from(moment([2007, 1, 28]).add({s:44}), true),  "secondes",    "44 seconds = seconds");
+    equal(start.from(moment([2007, 1, 28]).add({s:44}), true),  "quelques secondes", "44 seconds = a few seconds");
     equal(start.from(moment([2007, 1, 28]).add({s:45}), true),  "une minute",   "45 seconds = a minute");
     equal(start.from(moment([2007, 1, 28]).add({s:89}), true),  "une minute",   "89 seconds = a minute");
     equal(start.from(moment([2007, 1, 28]).add({s:90}), true),  "2 minutes",  "90 seconds = 2 minutes");
@@ -124,12 +124,12 @@ test("from", 30, function() {
 
 test("suffix", 2, function() {
     moment.lang('fr');
-    equal(moment(30000).from(0), "in secondes", "prefix");
-    equal(moment(0).from(30000), "il y a secondes", "suffix");
+    equal(moment(30000).from(0), "dans quelques secondes", "prefix");
+    equal(moment(0).from(30000), "il y a quelques secondes", "suffix");
 });
 
 test("fromNow", 2, function() {
     moment.lang('fr');
-    equal(moment().add({s:30}).fromNow(), "in secondes", "in seconds");
-    equal(moment().add({d:5}).fromNow(), "in 5 jours", "in 5 days");
+    equal(moment().add({s:30}).fromNow(), "dans quelques secondes", "in a few seconds");
+    equal(moment().add({d:5}).fromNow(), "dans 5 jours", "in 5 days");
 });
\ No newline at end of file