<!DOCTYPE html>
<html lang="ko">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<title>Document</title>
<!-- 숫자를 포맷하고 조작하기위한 자바 스크립트 라이브러리 -->
<script src="http://cdnjs.cloudflare.com/ajax/libs/numeral.js/2.0.6/numeral.min.js"></script>
<!-- 날짜를 포맷하고 조작하기위한 자바 스크립트 라이브러리 -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.24.0/moment.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.24.0/locale/ko.js"></script>
<!-- Jquery -->
<script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
<script src="kimcLunar.js"></script>
</head>
<body>
<script>
var year = moment().format("YYYY") * 1;
var month = moment().format("MM") * 1;
var date = moment().format("DD") * 1;
document.writeln(moment().format("YYYY-MM-DD") + "<br>");
document.writeln(getGanjiKor(year) + "<br>");
document.writeln(getGanjiHan(year) + "<br>");
document.writeln(getZodiacSignColorKor(year) + "<br>");
document.writeln(getZodiacSignColorHan(year) + "<br>");
document.writeln(getZodiacSignKor(year) + "<br>");
document.writeln(getZodiacSignHan(year) + "<br>");
document.writeln(getStar(month, date) + "<br>");
document.writeln(getStone(month) + "<br>");
document.writeln(JSON.stringify(getAgeCompute(2019, 2, 7)) + "<br>");
try {
document.writeln(JSON.stringify(calcLunar(2019, 2, 7, 1, 0)) + "<br>");
document.writeln(JSON.stringify(calcLunar(2019, 1, 3, 2, 0)) + "<br>");
document.writeln(
"음력 : " + JSON.stringify(getLunar(2019, 2, 7)) + "<br>"
);
document.writeln(
"양력 : " + JSON.stringify(getSolar(2019, 1, 3, false)) + "<br>"
);
// 윤달 검사
document.writeln(
"===============================================================<br>"
);
document.writeln(JSON.stringify(getLunar(2020, 5, 25)) + "<br>");
document.writeln(JSON.stringify(getLunar(2020, 4, 25)) + "<br>");
document.writeln(JSON.stringify(getSolar(2020, 4, 3, true)) + "<br>");
document.writeln(JSON.stringify(getSolar(2020, 4, 3, false)) + "<br>");
document.writeln(
"===============================================================<br>"
);
document.writeln(
JSON.stringify(isHoliday(2019, 2, 1, false, false)) + "<br>"
);
document.writeln(
"===============================================================<br>"
);
document.writeln(JSON.stringify(getLunar(2019, 12, 19)) + "<br>");
document.writeln(
JSON.stringify(getSolar(2019, 11, 24, false)) + "<br>"
);
document.writeln(
JSON.stringify(isHoliday(2019, 11, 24, true, false)) + "<br>"
);
document.writeln(
"===============================================================<br>"
);
var i;
for (i = 1; i <= 30; i++) {
document.writeln(JSON.stringify(getLunar(2019, 9, i)) + " : ");
document.writeln(
JSON.stringify(isHoliday(2019, 9, i, false, false)) + "<br>"
);
}
} catch (e) {
alert(e);
}
</script>
</body>
</html>