My background is C and Perl. I'm new to javascript, but not
programming.
I need to make two simple calendars with the next two months dates in
them. I call them with the current month, as in:
makeCalNav('2003', '11');
function makeCalNav(yy,mm) {
var code = '';
// make a two-month calendar starting with next month
for ( i=1; i<3; i++ ){
cal = initCalendar( yy, mm + i);
code += drawCal( cal );
}
return code;
}
function initCalendar( year, month ) {
var Calendar = new Date(year, month, 1);
return Calendar;
}
In Perl, passing 2003, 12 to a date routine would be a value out of
range. Javascript IE and Mozilla for Mac seem to correctly increment
the year and initialize the calendar for jan. 2004 and feb. 2004, Is
this as it should be?
--
cp