everything changed
This commit is contained in:
@@ -51,11 +51,11 @@ extension PersistenceController {
|
||||
}
|
||||
}
|
||||
|
||||
func generateObjectNotInArray() -> MoodEntry {
|
||||
func generateObjectNotInArray(forDate date: Date = Date(), withMood mood: Mood = .placeholder) -> MoodEntry {
|
||||
let newItem = MoodEntry(context: childContext)
|
||||
newItem.timestamp = Date()
|
||||
newItem.moodValue = Int16(Mood.placeholder.rawValue)
|
||||
newItem.forDate = Date()
|
||||
newItem.moodValue = Int16(mood.rawValue)
|
||||
newItem.forDate = date
|
||||
newItem.weekDay = Int16(Calendar.current.component(.weekday, from: Date()))
|
||||
newItem.canEdit = false
|
||||
newItem.canDelete = false
|
||||
|
||||
Reference in New Issue
Block a user