mirror of
https://gitee.com/dromara/carbon.git
synced 2024-11-30 03:07:36 +08:00
v2.1.3 初始化 l.isInvalid
This commit is contained in:
parent
b505c4e136
commit
cfa7c8e071
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user