8 Star 56 Fork 17

6tail / lunar-javascript

Create your Gitee Account
Explore and code with more than 5 million developers,Free private repositories !:)
Sign up
Clone or download
demo.html 671 Bytes
Copy Edit Web IDE Raw Blame History
6tail authored 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>

Comment ( 0 )

Sign in for post a comment

JavaScript
1
https://git.oschina.net/6tail/lunar-javascript.git
git@git.oschina.net:6tail/lunar-javascript.git
6tail
lunar-javascript
lunar-javascript
master

Search