From: John Fischer Date: Wed, 2 Nov 2011 00:26:39 +0000 (+0100) Subject: fixed time elapsed if it happend in the same second X-Git-Tag: 1.1.1~17^2 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=refs%2Fpull%2F37%2Fhead;p=thirdparty%2Fmoment.git fixed time elapsed if it happend in the same second fix french language --- diff --git a/lang/fr.js b/lang/fr.js index 123742eea..bb2815284 100644 --- a/lang/fr.js +++ b/lang/fr.js @@ -1,7 +1,7 @@ (function () { var lang = { 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("_"), + monthsShort : "Jan_Fév_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("_"), // based on this article on writing dates in french: diff --git a/moment.js b/moment.js index 11a646467..577fa3493 100644 --- a/moment.js +++ b/moment.js @@ -457,7 +457,7 @@ var difference = this.diff(time), rel = moment.relativeTime, output = relativeTime(difference); - return withoutSuffix ? output : (difference < 0 ? rel.past : rel.future).replace(/%s/i, output); + return withoutSuffix ? output : (difference <= 0 ? rel.past : rel.future).replace(/%s/i, output); }, fromNow : function (withoutSuffix) {