이번주의 기간이 몇일부터 몇일까지인지 알려줍니다
페이지 정보
작성자 서방님 댓글 0건 조회 118회 작성일 07-08-11 20:28본문
<html>
<head>
<title>BLUEB</title>
<SCRIPT LANGUAGE="JavaScript">
<!--
function formatDate(date) {
var mymonth = date.getMonth()+1;
var myweekday = date.getDate();
return (mymonth + "/" + myweekday);
}
function printWeek() {
var now = new Date();
var nowDayOfWeek = now.getDay();
var nowDay = now.getDate();
var nowMonth = now.getMonth();
var nowYear = now.getYear();
nowYear += (nowYear < 2000) ? 1900 : 0;
var weekStartDate = new Date(nowYear, nowMonth, nowDay - nowDayOfWeek);
var weekEndDate = new Date(nowYear, nowMonth, nowDay + (6 - nowDayOfWeek));
document.write("이번주는 : " + formatDate(weekStartDate) + " - " + formatDate(weekEndDate));
}
-->
</script>
</HEAD>
<BODY>
<b>
<script>
printWeek();
</script>
</BODY>
</HTML>
댓글목록
등록된 댓글이 없습니다.