我想从保存的FSCalendar
中在date
中显示事件。谁按日期选择器存储。但是日期存储在魔术记录中,并且它是字符串格式,因此该怎么做?
func calendar(_ calendar: FSCalendar, numberOfEventsFor date: Date) -> Int {
let data = SubTaskList.mr_findAll(with: NSPredicate(format: "date == %@", "\(String(describing: task?.date))"))
print(task?.date as Any)
return (data?.count)!
}