lunar是一个无依赖的支持阳历和阴历的日历工具库,它开源免费,有javascript、java、c#、php、python、go、typescript版本,不依赖第三方,支持阳历阴历互转,它能用来制作日历,甚至算命。
目前支持公历和农历、星座、干支、生肖、节气、节日、彭祖百忌、每日宜忌、吉神宜趋、凶煞宜忌、吉神方位、冲煞、纳音、星宿、八字、五行、十神、建除十二值星、青龙名堂等十二神、黄道黑道日及吉凶等。
支持的时间跨度:1901-01-01(庚子年冬月十一)至2099-12-31(己未年冬月二十)。
github:
- javascript:https://github.com/6tail/lunar-javascript
- java:https://github.com/6tail/lunar-java
- c#.net:https://github.com/6tail/lunar-csharp
- php:https://github.com/6tail/lunar-php
- python:https://github.com/6tail/lunar-python
- go:https://github.com/6tail/lunar-go
- typescript:https://github.com/6tail/lunar-typescript
gitee:
- javascript:https://gitee.com/6tail/lunar-javascript
- java:https://gitee.com/6tail/lunar-java
- c#.net:https://gitee.com/6tail/lunar-csharp
- php:https://gitee.com/6tail/lunar-php
- python:https://gitee.com/6tail/lunar-python
- go:https://gitee.com/6tail/lunar-go
- typescript:https://gitee.com/6tail/lunar-typescript
这里仅提供javascript版本api,其他版本的api也基本保持一致,可融会贯通。
开源协议:MIT License