Commit 1cd63921 authored by David黄金龙's avatar David黄金龙

处理可能的崩溃

parent d9ce71d3
......@@ -48,11 +48,11 @@ class YHActivityModel: YHBaseModel {
let weekday = calendar.component(.weekday, from: date)
// 星期几的名称,根据weekday的值,1到7分别代表周一到周日
let weekdayName = ["周日", "周一", "周二", "周三", "周四", "周五", "周六"][weekday - 1]
//3.
beginTimeForUI = dateString + " " + weekdayName + " " + titmeString
if weekday > 0 && weekday < 8 {
let weekdayName = ["周日", "周一", "周二", "周三", "周四", "周五", "周六"][weekday - 1]
//3.
beginTimeForUI = dateString + " " + weekdayName + " " + titmeString
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment