everything changed

This commit is contained in:
Trey t
2022-02-20 14:33:58 -06:00
parent 1cf38cb854
commit 0035f61204
50 changed files with 2155 additions and 875 deletions

View File

@@ -73,13 +73,12 @@ extension PersistenceController {
var components = DateComponents()
components.month = month
components.year = year
components.day = 1
let startDateOfMonth = Calendar.current.date(from: components)!
let items = data.filter({ entry in
let components = calendar.dateComponents([.month, .year], from: startDateOfMonth)
let entryComponents = calendar.dateComponents([.month, .year], from: entry.forDate!)
return (components.month == entryComponents.month && components.year == entryComponents.year)
})
let items = PersistenceController.shared.getData(startDate: startDateOfMonth,
endDate: startDateOfMonth.endOfMonth,
includedDays: [1,2,3,4,5,6,7])
if !items.isEmpty {
allMonths[month] = items
}