달력 스크립트
.
<script language="JavaScript">
<!--
var today = new Date();
var year = today.getYear();
if (year < 2000){year += 1900;}
var month = today.getMonth();
var date = today.getDate();
var day = today.getDay();
var week;
if (day == 0) {week = "일요일";}
else if (day == 1) {week = "월요일";}
else if (day == 2) {week = "화요일";}
else if (day == 3) {week = "수요일";}
else if (day == 4) {week = "목요일";}
else if (day == 5) {week = "금요일";}
else if (day == 6) {week = "토요일";}
var firstday = new Date(year, month, 1)
var x = (1-firstday.getDay());
function leapYear(year) {
if (year % 4 == 0) return true;
}
function lastday(month, year) {
var ld = new Array()
ld[0] = 31
ld[1] = (leapYear(year)) ? 29 : 28
ld[2] = 31
ld[3] = 30
ld[4] = 31
ld[5] = 30
ld[6] = 31
ld[7] = 31
ld[8] = 30
ld[9] = 31
ld[10] = 30
ld[11] = 31
return ld[month]
}
document.write("<TABLE CELLSPACING=0 CELLPADDING=3 BORDER=0 bordercolor=f0f0f0 align=center style=border-collapse:collapse>");
//현재 년도와 월을 표시
document.write("<TR ALIGN=center><TD COLSPAN=7>"+year+" "+"/ "+(month+1)+"</TD></TR>");
document.write("<TABLE CELLSPACING=0 CELLPADDING=3 BORDER=1 bordercolor=f0f0f0 align=center style=border-collapse:collapse>");
//요일 표시
document.writeln("<TR ALIGN=center><TD>S</TD><TD>M</TD><TD>T</TD><TD>W");
document.writeln("</TD><TD>T</TD><TD>F</TD><TD>S</TD></TR>");
for(i=0;i<6;i++){
if(x>lastday(month, year)) break;
document.write("<TR ALIGN=right>");
for(j=0;j<7;j++){
if(x>0 && x<=lastday(month, year)){
if(x==date){document.write("<TD><FONT COLOR=ff9ca8>"+x+"</FONT></TD>");}
else{document.write("<TD>"+x+"</TD>");}
x++;
}
else{
document.write("<TD>"+" "+"</TD>");
x++;
}
}
document.write("</TR>");
}
document.write("</TABLE>");
//-->
</script>
<script language="JavaScript">
<!--
var days = new Array();
days[0] = "일요일";
days[1] = "월요일";
days[2] = "화요일";
days[3] = "수요일";
days[4] = "목요일";
days[5] = "금요일";
days[6] = "토요일";
var months = new Array();
months[0] = "1월";
months[1] = "2월";
months[2] = "3월";
months[3] = "4월";
months[4] = "5월";
months[5] = "6월";
months[6] = "7월";
months[7] = "8월";
months[8] = "9월";
months[9] = "10월";
months[10] = "11월";
months[11] = "12월";
// -->
</script>
<font color="#ffffff" size="0">. <script language="JavaScript"><!--
var now = new Date();
document.write(months[now.getMonth()] + now.getDate() +". " + days[now.getDay()]);
// --></script>