weeks and minutes cleanup
This commit is contained in:
parent
a5213658fa
commit
83fbcc129c
@ -116,13 +116,13 @@ function longAgo(when, now) {
|
||||
var seconds = Math.round((now - when) / 1000);
|
||||
var times = [
|
||||
seconds / 60 / 60 / 24 / 365, // years
|
||||
seconds / 60 / 60 / 24 / 30, // months
|
||||
seconds / 60 / 60 / 24 / 7, // weeks
|
||||
seconds / 60 / 60 / 24, // days
|
||||
seconds / 60 / 60, // hours
|
||||
seconds / 60, // minutes
|
||||
seconds // seconds
|
||||
];
|
||||
var names = ['y', 'mon', 'd', 'h', 'min', 's'];
|
||||
var names = ['y', 'w', 'd', 'h', 'm', 's'];
|
||||
|
||||
for (var i = 0; i < names.length; i++) {
|
||||
var time = Math.floor(times[i]);
|
||||
|
Reference in New Issue
Block a user