简要介绍
lunar是一个支持阳历、阴历、佛历和道历的日历工具库,它开源免费,有多种开发语言的版本,不依赖第三方,支持阳历、阴历、佛历、道历、儒略日的相互转换,还支持星座、干支、生肖、节气、节日、彭祖百忌、每日宜忌、吉神宜趋、凶煞宜忌、吉神方位、冲煞、纳音、星宿、八字、五行、十神、建除十二值星、青龙名堂等十二神、黄道日及吉凶等。仅供参考,切勿迷信。
支持的时间跨度约为0001年至9999年。
lunar的升级版 Tyme 可以尝鲜了!
github:
- javascript:https://github.com/6tail/lunar-javascript
- java:https://github.com/6tail/lunar-java
- c#.net:https://github.com/6tail/lunar-csharp
- php(composer):https://github.com/6tail/lunar-php
- php(单文件):https://github.com/6tail/lunar-php-standalone
- python:https://github.com/6tail/lunar-python
- go:https://github.com/6tail/lunar-go
- typescript:https://github.com/6tail/lunar-typescript
- flutter:https://github.com/6tail/lunar-flutter
- swift:https://github.com/6tail/lunar-swift
gitee:
- javascript:https://gitee.com/6tail/lunar-javascript
- java:https://gitee.com/6tail/lunar-java
- c#.net:https://gitee.com/6tail/lunar-csharp
- php(composer):https://gitee.com/6tail/lunar-php
- php(单文件):https://gitee.com/6tail/lunar-php-standalone
- python:https://gitee.com/6tail/lunar-python
- go:https://gitee.com/6tail/lunar-go
- typescript:https://gitee.com/6tail/lunar-typescript
- flutter:https://gitee.com/6tail/lunar-flutter
- swift:https://gitee.com/6tail/lunar-swift
这里主要提供javascript版本api,其他版本的api也基本保持一致,可融会贯通。
开源协议:MIT License
示例
为了证明它的能力,这里直接使用lunar展示一个简单的今日黄历。
冲煞
彭祖
喜神
福神
财神
宜
忌
吉神
凶神
你还可以从左侧菜单中查看更多有趣的示例。
节气的计算基于寿星天文历v5.10的核心算法并根据需要做了一些改造。由于所有信息来源于网络搜集和我自己的理解,如有错误,还请指正。
联系我
电子邮件:6tail@6tail.cn
QQ群:7866820
捐赠
感谢 捐赠者们 的支持。捐赠前请三思,不要大额捐赠找我帮忙做二次开发,我平时工作也挺忙的。