blank filling was off by one

leading to jan 1 of next year being included
This commit is contained in:
Damien Elmes 2020-08-21 13:40:50 +10:00
parent 98a0753eb8
commit d24f34c238

View file

@ -90,7 +90,7 @@ export function renderCalendar(
// fill in any blanks
const startDate = timeYear(nowForYear);
for (let i = 0; i < 366; i++) {
for (let i = 0; i < 365; i++) {
const date = new Date(startDate.getTime() + i * 86400 * 1000);
if (date > now) {
// don't fill out future dates