diff options
author | tomsmeding <tom.smeding@gmail.com> | 2017-02-17 20:11:44 +0100 |
---|---|---|
committer | tomsmeding <tom.smeding@gmail.com> | 2017-02-17 20:11:44 +0100 |
commit | c0dc8650ab9301b731142776ea5e401c6ce57559 (patch) | |
tree | 1798328b4e6036e033c020ddd838224c7554d51d /modules/todo | |
parent | ea2fba20fc6f537b9224a24ba7a1f923aea045a2 (diff) |
todo: more specific time-left indicator
Diffstat (limited to 'modules/todo')
-rw-r--r-- | modules/todo/todo.html | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/modules/todo/todo.html b/modules/todo/todo.html index 1f2a060..b48d155 100644 --- a/modules/todo/todo.html +++ b/modules/todo/todo.html @@ -77,6 +77,8 @@ function fancydate(date){ } var diffweeks=~~(diffdays/7); if(diffweeks>0){ + if(diffdays%7==3||diffdays%7==4)diffweeks+=0.5; + else if(diffdays%7==5||diffdays%7==6)diffweeks++; return weekdays[(date.getDay()+6)%7]+" in "+diffweeks+" week"+(diffweeks==1?"":"s"); } if(diffdays==1){ |