현재 날짜를 한글로 출력
페이지 정보
작성자
관리자
작성일
2008.02.15 12:08
4,356 조회
본문
<SCRIPT LANGUAGE="JavaScript">
<!--
var now = new Date();
var days = new Array('일','월','화','수','목','금','토');
var months = new Array('1월','2월','3월','4월','5월','6월','7월','8월','9월','10월','11월','12월');
var date = ((now.getDate()<10) ? "0" : "")+ now.getDate();
function fourdigits(number) {
return (number < 1000) ? number + 1900 : number;
}
today =
(fourdigits(now.getYear())) +"년" +
months[now.getMonth()] + " " +
date + "일, " +
days[now.getDay()] + "요일" ;
document.write(today);
//-->
</script>
<!--
var now = new Date();
var days = new Array('일','월','화','수','목','금','토');
var months = new Array('1월','2월','3월','4월','5월','6월','7월','8월','9월','10월','11월','12월');
var date = ((now.getDate()<10) ? "0" : "")+ now.getDate();
function fourdigits(number) {
return (number < 1000) ? number + 1900 : number;
}
today =
(fourdigits(now.getYear())) +"년" +
months[now.getMonth()] + " " +
date + "일, " +
days[now.getDay()] + "요일" ;
document.write(today);
//-->
</script>
댓글 0