weeks and minutes cleanup

This commit is contained in:
Dave Eddy 2015-08-26 13:00:01 -04:00
parent a5213658fa
commit 83fbcc129c

View File

@ -116,13 +116,13 @@ function longAgo(when, now) {
var seconds = Math.round((now - when) / 1000); var seconds = Math.round((now - when) / 1000);
var times = [ var times = [
seconds / 60 / 60 / 24 / 365, // years 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 / 24, // days
seconds / 60 / 60, // hours seconds / 60 / 60, // hours
seconds / 60, // minutes seconds / 60, // minutes
seconds // seconds 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++) { for (var i = 0; i < names.length; i++) {
var time = Math.floor(times[i]); var time = Math.floor(times[i]);