\r
function isToday(date)\r
{\r
- if (date.getDate() == now.getDate() && date.getMonth() == now.getMonth())\r
+ if (date.getFullYear() == now.getFullYear() && date.getMonth() == now.getMonth() && date.getDate() == now.getDate())\r
return true;\r
return false;\r
}\r
\r
function isTomorrow(date)\r
{\r
- if ((date.getDate() == now.getDate() + 1 && date.getMonth() == now.getMonth()) ||\r
- (date.getDate() == 1 && date.getMonth() == now.getMonth() + 1) ||\r
- (date.getDate() == 1 && date.getMonth() == 0 && now.getMonth() == 11 && date.getYear() == now.getYear() + 1))\r
+ var tomorrow = new Date (now.getTime() + 24 * 60 * 60 * 1000);\r
+ if (date.getFullYear() == tomorrow.getFullYear() && date.getMonth() == tomorrow.getMonth() && date.getDate() == tomorrow.getDate())\r
return true;\r
- return false;\r
+ else\r
+ return false; \r
}\r
\r
function collectLocales()\r