From c0dc8650ab9301b731142776ea5e401c6ce57559 Mon Sep 17 00:00:00 2001 From: tomsmeding Date: Fri, 17 Feb 2017 20:11:44 +0100 Subject: todo: more specific time-left indicator --- modules/todo/todo.html | 2 ++ 1 file changed, 2 insertions(+) (limited to 'modules/todo/todo.html') 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){ -- cgit v1.2.3-70-g09d2