<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<script>
let now = new Date();
let year = now.getFullYear();
let month = now.getMonth();
let _date = now.getDate();
let day = now.getDay();
let hour = now.getHours();
let min = now.getMinutes();
let sec = now.getSeconds();
const week = ["일", "월", "화", "수", "목", "금", "토"];
if(hour > 12) {
hour = hour - 12;
}
if(hour < 10) {
hour = "0" + hour
}
if(min < 10) {
min = "0" + min
}
if(sec < 10) {
sec = "0" + sec
}
document.write(`${year}년 ${month + 1}월 ${_date}일 ${week[day]}요일 ${hour}시 ${min}분 ${sec}초`) ;
</script>
</body>
</html>