24 Star 344 Fork 107

6tail / lunar-javascript

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
demo.html 671 Bytes
一键复制 编辑 原始数据 按行查看 历史
6tail 提交于 2018-06-23 17:22 . Initial commit
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>lunar</title>
</head>
<body>
<script src="lunar.js"></script>
<script>
//当前日期生成农历对象
var date = Lunar.fromDate(new Date());
document.write(date.toFullString());
document.write('<br>');
//转阳历
document.write(date.getSolar().toFullString());
document.write('<br><br>');
//指定日期生成农历对象
date = Lunar.fromYmd(1986,4,21);
document.write(date.toFullString());
document.write('<br>');
//转阳历
document.write(date.getSolar().toFullString());
</script>
</body>
</html>
JavaScript
1
https://gitee.com/6tail/lunar-javascript.git
git@gitee.com:6tail/lunar-javascript.git
6tail
lunar-javascript
lunar-javascript
master

搜索帮助