I have my table/grid: . This have 365 divs, 1 per day, created with js:
$(document).ready(function() {
for (var i = 0; i < daysInThisYear(); i++) {
$('#año').append('<div class="dia" id="div' + i +'" /> ');
}
})
This detects if 365 or 366 days:
function daysInThisYear() {
return isLeapYear() ? 366 : 365;
}
function isLeapYear() {
return currentYear % 400 === 0 || (currentYear % 100 !== 0 && currentYear % 4 === 0);
}
okay, i have my grid it's ok, but i want to put days and months, like this: . If month have 31 days, creates 31 squares, and everything together, without separations, how can i do this? And put number of the day at left and letter of month at top, idk how to to this, thanks.