mirror of
https://github.com/scratchfoundation/jquery-timeago.git
synced 2024-11-30 11:06:55 -05:00
Added support for $.timeago to accept a millisecond UNIX epoch value
#78
This commit is contained in:
parent
e9aff9d663
commit
c3fca2db92
1 changed files with 2 additions and 0 deletions
|
@ -19,6 +19,8 @@
|
|||
return inWords(timestamp);
|
||||
} else if (typeof timestamp === "string") {
|
||||
return inWords($.timeago.parse(timestamp));
|
||||
} else if (typeof timestamp === "number") {
|
||||
return inWords(new Date(timestamp));
|
||||
} else {
|
||||
return inWords($.timeago.datetime(timestamp));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue