PHPackages                             lyyteam/huaxia-lunar-calendar - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. lyyteam/huaxia-lunar-calendar

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

lyyteam/huaxia-lunar-calendar
=============================

面向 PHP 8 的专业中国历法库：公历/农历/佛历/道历、24 节气（寿星天文历秒级）、四柱八字、大运流年、真太阳时与法定假日，零框架依赖，适用于 ThinkPHP/Laravel/任意 PHP 项目

1.0.0(yesterday)02↑2900%MITPHPPHP &gt;=8.0CI failing

Since Jun 22Pushed yesterdayCompare

[ Source](https://github.com/lyyteam/huaxia-lunar-calendar)[ Packagist](https://packagist.org/packages/lyyteam/huaxia-lunar-calendar)[ Docs](https://github.com/lyyteam/huaxia-lunar-calendar)[ RSS](/packages/lyyteam-huaxia-lunar-calendar/feed)WikiDiscussions main Synced today

READMEChangelogDependenciesVersions (2)Used By (0)

lyyteam/huaxia-lunar-calendar
=============================

[](#lyyteamhuaxia-lunar-calendar)

面向 **PHP 8+** 的专业中国历法计算库。基于寿星天文历实现秒级节气，支持四柱八字、大运流年、真太阳时校正及法定假日查询，**零框架依赖、零第三方 Composer 依赖**，可嵌入 ThinkPHP、Laravel、Symfony 或任意 PHP 应用。

[![Tests](https://camo.githubusercontent.com/02961ad1af65949c255c2dca5975a31fc056f7c89f12d270c6fa932f3b9e27f7/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6c79797465616d2f6875617869612d6c756e61722d63616c656e6461722f74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473266c6f676f3d676974687562)](https://github.com/lyyteam/huaxia-lunar-calendar/actions/workflows/tests.yml)[![PHP](https://camo.githubusercontent.com/8aa41ea7f8168ba0065b3d53aa343b06686652db1bc5b5af410cf795b633c68f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d253345253344382e302d3737374242343f6c6f676f3d706870266c6f676f436f6c6f723d7768697465)](https://www.php.net/)[![License](https://camo.githubusercontent.com/23fa0209dbcd0601999ed6a154253f53bf70833ecd9e5fcb3b7e0b1d8c0a1b21/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6c79797465616d2f6875617869612d6c756e61722d63616c656e646172)](LICENSE)

特性
--

[](#特性)

- **历法互转**：公历、农历、佛历、道历
- **节气精确**：寿星天文历 `ShouXingUtil`，交接时刻秒级
- **八字命理**：四柱 `EightChar`、大运 `Yun` / `DaYun`、流年 `LiuNian`、流月 `LiuYue`
- **流派支持**：晚子时 sect1/2、起运 sect1/2 可分离配置
- **真太阳时**：经度校正 + 同源均时差 + 1986–1991 夏令时
- **民俗辅助**：法定假日、三伏数九、星座、城市经度库
- **专业验证**：2424 项节气双锁、5600+ 属性断言、HKO 外部对照，详见 [ACCURACY.md](ACCURACY.md)

**源码仓库：**

安装
--

[](#安装)

```
composer require lyyteam/huaxia-lunar-calendar:^1.0
```

尚未发布到 Packagist 时，可添加 VCS 仓库：

```
{
    "repositories": [
        {
            "type": "vcs",
            "url": "https://github.com/lyyteam/huaxia-lunar-calendar"
        }
    ],
    "require": {
        "lyyteam/huaxia-lunar-calendar": "^1.0"
    }
}
```

快速开始
----

[](#快速开始)

```
