summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortomsmeding <tom.smeding@gmail.com>2017-02-17 20:11:44 +0100
committertomsmeding <tom.smeding@gmail.com>2017-02-17 20:11:44 +0100
commitc0dc8650ab9301b731142776ea5e401c6ce57559 (patch)
tree1798328b4e6036e033c020ddd838224c7554d51d
parentea2fba20fc6f537b9224a24ba7a1f923aea045a2 (diff)
todo: more specific time-left indicator
-rw-r--r--modules/todo/todo.html2
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){