filtering days in customize will filter views
This commit is contained in:
@@ -48,10 +48,10 @@ extension PersistenceController {
|
||||
return data
|
||||
}
|
||||
|
||||
public func splitIntoYearMonth() -> [Int: [Int: [MoodEntry]]] {
|
||||
public func splitIntoYearMonth(includedDays: [Int]) -> [Int: [Int: [MoodEntry]]] {
|
||||
let data = PersistenceController.shared.getData(startDate: Date(timeIntervalSince1970: 0),
|
||||
endDate: Date(),
|
||||
includedDays: [1,2,3,4,5,6,7]).sorted(by: {
|
||||
includedDays: includedDays).sorted(by: {
|
||||
$0.forDate! < $1.forDate!
|
||||
})
|
||||
var returnData = [Int: [Int: [MoodEntry]]]()
|
||||
|
||||
Reference in New Issue
Block a user