mirror of
https://github.com/nextcloud/server.git
synced 2026-06-12 10:10:49 -04:00
simplify formula and add comment
This commit is contained in:
parent
053b0a4063
commit
b6aeea8c0b
1 changed files with 3 additions and 2 deletions
|
|
@ -675,8 +675,9 @@
|
|||
}).text(simpleSize);
|
||||
tr.append(td);
|
||||
|
||||
// date column
|
||||
var modifiedColor = Math.round(((Math.round((new Date()).getTime()) - mtime)/60/60/24*5) / 1000);
|
||||
// date column (1000 milliseconds to seconds, 60 seconds, 60 minutes, 24 hours)
|
||||
// difference in days multiplied by 5 - brightest shade for files older than 32 days (160/5)
|
||||
var modifiedColor = Math.round(((new Date()).getTime() - mtime )/1000/60/60/24*5 );
|
||||
// ensure that the brightest color is still readable
|
||||
if (modifiedColor >= '160') {
|
||||
modifiedColor = 160;
|
||||
|
|
|
|||
Loading…
Reference in a new issue