overtrue / chinese-calendar

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

阳历转阴历报错--bug #41

Closed nelsonkti closed 4 years ago

nelsonkti commented 4 years ago

阳历时间:2019-4-30

   InvalidArgumentException  : 传入的参数不合法

  at /home/hr/jz-yibashou/vendor/overtrue/chinese-calendar/src/Calendar.php:750
    746|         }
    747|
    748|         // 参数合法性效验
    749|         if ($year < 1900 || $year > 2100 || $day > $maxDays) {
  > 750|             throw new InvalidArgumentException('传入的参数不合法');
    751|         }
    752|
    753|         // 计算农历的时间差
    754|         $offset = 0;

  Exception trace:

  1   Overtrue\ChineseCalendar\Calendar::lunar2solar()
      /home/hr/jz-yibashou/vendor/overtrue/chinese-calendar/src/Calendar.php:250

  2   Overtrue\ChineseCalendar\Calendar::lunar()
      /home/hr/jz-yibashou/app/Transformers/EmployeesBaseTransformer.php:77

  Please use the argument -v to see more details.
overtrue commented 4 years ago

农历 2019 4月只有29,没有30