Skip to content

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

@erickyim

Description

@erickyim

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions