From eef725a3ae46761b274c59f489c28ea7befe4bd4 Mon Sep 17 00:00:00 2001 From: John Fischer Date: Wed, 2 Nov 2011 01:26:39 +0100 Subject: [PATCH] fixed time elapsed if it happend in the same second fix french language --- lang/fr.js | 2 +- moment.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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) { -- 2.47.2