mirror of
https://github.com/scratchfoundation/jquery-timeago.git
synced 2024-11-23 15:57:54 -05:00
Run substitute on all strings
This commit is contained in:
parent
0cd7e1eab1
commit
5346cba5ae
1 changed files with 5 additions and 5 deletions
|
@ -64,15 +64,15 @@
|
||||||
var years = days / 365;
|
var years = days / 365;
|
||||||
|
|
||||||
var words = seconds < 45 && substitute($l.seconds, Math.round(seconds)) ||
|
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 < 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 < 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 < 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)) ||
|
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));
|
substitute($l.years, Math.floor(years));
|
||||||
|
|
||||||
return $.trim([prefix, words, suffix].join(" "));
|
return $.trim([prefix, words, suffix].join(" "));
|
||||||
|
|
Loading…
Reference in a new issue