Permalink
Browse files

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

  • Loading branch information...
rmm5t committed May 16, 2012
1 parent e9aff9d commit c3fca2db9204f4d9c6953458de150eecc5df1507
Showing with 2 additions and 0 deletions.
  1. +2 −0 jquery.timeago.js
View
@@ -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));
}

0 comments on commit c3fca2d

Please sign in to comment.