v2.1.3 初始化 l.isInvalid

This commit is contained in:
gouguoyin 2022-04-21 16:51:29 +08:00
parent b505c4e136
commit cfa7c8e071

View File

@ -55,6 +55,7 @@ type lunar struct {
// 将公历转为农历
func (c Carbon) Lunar() (l lunar) {
carbon := c.SetTimezone(PRC)
l.isInvalid = false
if carbon.IsInvalid() {
l.Error = carbon.Error
l.isInvalid = true