Small improvement to timestamp

Former-commit-id: 4ac24011dc2c460d159a1b983fa1f013d6daaeee
This commit is contained in:
Ziver Koc 2016-01-25 09:54:57 +01:00
parent ed3babdc56
commit b1464d9508

View file

@ -35,7 +35,7 @@ $.fn.relTimestamp = function() {
var timeDiff = timestampNow - timestamp;
if(timeDiff < 24 * 60 * 60 * 1000) // less than 24 hours
$(this).text(moment(timestamp).fromNow());
$(this).text(moment(timestamp).fromNow() + " ("+moment(timestamp).format("HH:mm")+")");
else
$(this).text(moment(timestamp).format("YYYY-MM-DD HH:mm"));
return this;