overtrue / chinese-calendar

:date: 中国农历(阴历)与阳历(公历)转换与查询工具
MIT License
522 stars 109 forks source link

八字计算:日柱和时柱结果错误 #54

Open zhangkai803 opened 1 year ago

zhangkai803 commented 1 year ago

您好,我在使用这个 Lib 的时候遇到了一个八字计算结果错误的问题

输入:1991-08-21 12:00:00

错误示例 image

正确示例 image

感谢作者的贡献。

zhangkai803 commented 1 year ago

环境如下:

❯ php -v
PHP 7.4.33 (cli) (built: Apr 26 2023 19:18:43) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
    with Xdebug v3.1.3, Copyright (c) 2002-2022, by Derick Rethans
    with Zend OPcache v7.4.33, Copyright (c), by Zend Technologies
{
    "overtrue/chinese-calendar": "^1.0"(1.0.2)
}

示例代码如下:

$calendar = new Calendar();
$calendar->solar("1991", "08", "21", "12");