From 5346cba5ae15a5b485d21ee772a27a94bb822da8 Mon Sep 17 00:00:00 2001 From: Ryan McGeary Date: Wed, 18 Feb 2009 11:24:57 -0500 Subject: [PATCH] Run substitute on all strings --- jquery.timeago.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/jquery.timeago.js b/jquery.timeago.js index 11b2cd2..371f9d5 100644 --- a/jquery.timeago.js +++ b/jquery.timeago.js @@ -64,15 +64,15 @@ var years = days / 365; var words = seconds < 45 && substitute($l.seconds, Math.round(seconds)) || - seconds < 90 && $l.minute || + seconds < 90 && substitute($l.minute, 1) || minutes < 45 && substitute($l.minutes, Math.round(minutes)) || - minutes < 90 && $l.hour || + minutes < 90 && substitute($l.hour, 1) || hours < 24 && substitute($l.hours, Math.round(hours)) || - hours < 48 && $l.day || + hours < 48 && substitute($l.day, 1) || days < 30 && substitute($l.days, Math.floor(days)) || - days < 60 && $l.month || + days < 60 && substitute($l.month, 1) || days < 365 && substitute($l.months, Math.floor(days / 30)) || - years < 2 && $l.year || + years < 2 && substitute($l.year, 1) || substitute($l.years, Math.floor(years)); return $.trim([prefix, words, suffix].join(" "));