mirror of
https://github.com/scratchfoundation/jquery-timeago.git
synced 2024-11-27 09:45:38 -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