X-Git-Url: https://code.delx.au/comingnext/blobdiff_plain/fea02bba692fc1a21bf9423f138e3bab3daf6498..7b49858cd1fcb737295bcba3d1bff3ee59c7b78b:/comingNext/index.html diff --git a/comingNext/index.html b/comingNext/index.html index 90a29cc..b722479 100644 --- a/comingNext/index.html +++ b/comingNext/index.html @@ -152,18 +152,18 @@ function error(message) function isToday(date) { - if (date.getDate() == now.getDate() && date.getMonth() == now.getMonth()) + if (date.getFullYear() == now.getFullYear() && date.getMonth() == now.getMonth() && date.getDate() == now.getDate()) return true; return false; } function isTomorrow(date) { - if ((date.getDate() == now.getDate() + 1 && date.getMonth() == now.getMonth()) || - (date.getDate() == 1 && date.getMonth() == now.getMonth() + 1) || - (date.getDate() == 1 && date.getMonth() == 0 && now.getMonth() == 11 && date.getYear() == now.getYear() + 1)) + var tomorrow = new Date (now.getTime() + 24 * 60 * 60 * 1000); + if (date.getFullYear() == tomorrow.getFullYear() && date.getMonth() == tomorrow.getMonth() && date.getDate() == tomorrow.getDate()) return true; - return false; + else + return false; } function collectLocales()