Source code var month = new Array('January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'); var days = new Array('Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'); var now = new Date(); var ctr; document.writeln(''); document.writeln('' + month[now.getMonth()] + ' ' + now.getFullYear() + ''); document.write(''); for (ctr=0; ctr<7; ctr++) { document.write('' + days[ctr] + ''); } document.writeln(''); var d0 = new Date(now.getFullYear(), now.getMonth(), 1); document.write(''); ctr = d0.getDay(); while (ctr-- > 0) { document.write(' '); } while (d0.getMonth() == now.getMonth()) { var d = d0.getDate(); if (d0.getDate() != now.getDate()) { document.write('' + d + ''); } else { document.write('' + d + ''); } d0.setDate(d0.getDate() + 1); if (d0.getDay() == 0) { document.writeln(''); if (d0.getMonth() == now.getMonth()) { document.write(''); } } } if (d0.getDay() != 0) { ctr = 7 - d0.getDay(); while (ctr-- > 0) { document.write(' '); } document.writeln(''); } document.writeln('');