Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added support for $.timeago to accept a millisecond UNIX epoch value

  • Loading branch information...
commit c3fca2db9204f4d9c6953458de150eecc5df1507 1 parent e9aff9d
@rmm5t authored
Showing with 2 additions and 0 deletions.
  1. +2 −0  jquery.timeago.js
View
2  jquery.timeago.js
@@ -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));
}
Please sign in to comment.
Something went wrong with that request. Please try again.