Skip to content

Commit

Permalink
Run substitute on all strings
Browse files Browse the repository at this point in the history
  • Loading branch information
rmm5t committed Feb 18, 2009
1 parent 0cd7e1e commit 5346cba
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions jquery.timeago.js
Expand Up @@ -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(" "));
Expand Down

0 comments on commit 5346cba

Please sign in to comment.