mirror of
https://github.com/scratchfoundation/jquery-timeago.git
synced 2025-02-17 00:20:32 -05:00
Fixed bug with cutoff and allowFuture
To reproduce the bug use these settings: ```js $.timeago.settings.cutoff = 7 * 86400000;// one week in milliseconds $.timeago.settings.allowFuture = true ``` You will se that the cutoff have no effect on a future date.
This commit is contained in:
parent
cb1b0fe977
commit
6822da82d9
1 changed files with 1 additions and 1 deletions
|
@ -179,7 +179,7 @@
|
|||
var $s = $t.settings;
|
||||
|
||||
if (!isNaN(data.datetime)) {
|
||||
if ( $s.cutoff == 0 || distance(data.datetime) < $s.cutoff) {
|
||||
if ( $s.cutoff == 0 || Math.abs(distance(data.datetime)) < $s.cutoff) {
|
||||
$(this).text(inWords(data.datetime));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue