Small improvement to timestamp
Former-commit-id: 4ac24011dc2c460d159a1b983fa1f013d6daaeee
This commit is contained in:
parent
ed3babdc56
commit
b1464d9508
1 changed files with 1 additions and 1 deletions
|
|
@ -35,7 +35,7 @@ $.fn.relTimestamp = function() {
|
||||||
var timeDiff = timestampNow - timestamp;
|
var timeDiff = timestampNow - timestamp;
|
||||||
|
|
||||||
if(timeDiff < 24 * 60 * 60 * 1000) // less than 24 hours
|
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
|
else
|
||||||
$(this).text(moment(timestamp).format("YYYY-MM-DD HH:mm"));
|
$(this).text(moment(timestamp).format("YYYY-MM-DD HH:mm"));
|
||||||
return this;
|
return this;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue