wwmz/WMZDialog

获取农历日期崩溃`- (BOOL)updateDateYear:(NSInteger)year Month:(NSInteger)month index:(NSInteger)index`出错导致

Opened this issue · 0 comments

WX20231009-170226@2x

(lldb) p zone
(__NSTimeZone *) 0x000000028390e0d0 @"America/Toronto"
(lldb) p nowDate
(__NSTaggedDate *) 0x94e1ad4c4d89f829 2023-10-01 00:00:00 UTC
(lldb) p nextDate
(__NSTaggedDate *) 0x94e00b704d89f829 2023-09-01 00:00:00 UTC
(lldb) p DaysInNextMonth
(NSInteger) 31

2023-09-01 9 月份只有30天,DaysInNextMonth = [NSDate totaldaysInMonth:nextDate] 获取到的是31
dateStr = "2023-09-31"
myDate = nil, 最后导致[NSDate getChineseCalendarWithDate:myDate Year:tmpYear Month:tmpMonth Day:tmpDay];崩溃

screenshot-20231009-152621