Day
class Day : NSManagedObject
Day NSManagedObject category/extension file: Contains many computed properties for summarily displaying related object information
Note
The following auto-generated properties are managed within ARISES.xcdatamodeld: date, exercise, favourite, glucose, illness, insulin, meals, stress,-
Returns an optional tuple containing low, avg and high glucose values (as doubles) for that day or nil if no glucose logs exist
Declaration
Swift
var glucoseStats: (low: Double, average: Double, high: Double)? { get }
-
Returns an optional tuple containing total macros for that day or (0,0,0) if no meal objects found
Declaration
Swift
var foodStats: (totCarbs: Int32, totProtein: Int32, totFat: Int32)? { get }
-
Returns the total duration of stress logs for the day as a string in HH:mm format or
0
if no logs existDeclaration
Swift
var stressDuration: String { get } -
Returns the total duration of illness logs for the day as a string in HH:mm format or
0
if no logs existDeclaration
Swift
var illnessDuration: String { get }
-
Returns an optional array of strings, containing any tags (
hypo
/hyper
) that exist in the glucose logs, an empty array if none exist, and Nil if no glucose logs exist.Declaration
Swift
var glucoseTags: [String]? { get }
-
Declaration
Swift
@nonobjc public class func fetchRequest() -> NSFetchRequest<Day> -
Declaration
Swift
@NSManaged public var date: String? { get set } -
Declaration
Swift
@NSManaged public var exercise: NSSet? { get set } -
Declaration
Swift
@NSManaged public var favourite: Favourites? { get set } -
Declaration
Swift
@NSManaged public var glucose: NSSet? { get set } -
Declaration
Swift
@NSManaged public var illness: NSSet? { get set } -
Declaration
Swift
@NSManaged public var insulin: NSSet? { get set } -
Declaration
Swift
@NSManaged public var meals: NSSet? { get set } -
Declaration
Swift
@NSManaged public var stress: NSSet? { get set }
-
Declaration
Swift
@objc(addExerciseObject:) @NSManaged public func addToExercise(_ value: Exercise) -
Declaration
Swift
@objc(removeExerciseObject:) @NSManaged public func removeFromExercise(_ value: Exercise) -
Declaration
Swift
@objc(addExercise:) @NSManaged public func addToExercise(_ values: NSSet) -
Declaration
Swift
@objc(removeExercise:) @NSManaged public func removeFromExercise(_ values: NSSet)
-
Declaration
Swift
@objc(addGlucoseObject:) @NSManaged public func addToGlucose(_ value: Glucose) -
Declaration
Swift
@objc(removeGlucoseObject:) @NSManaged public func removeFromGlucose(_ value: Glucose) -
Declaration
Swift
@objc(addGlucose:) @NSManaged public func addToGlucose(_ values: NSSet) -
Declaration
Swift
@objc(removeGlucose:) @NSManaged public func removeFromGlucose(_ values: NSSet)
-
Declaration
Swift
@objc(addIllnessObject:) @NSManaged public func addToIllness(_ value: Illness) -
Declaration
Swift
@objc(removeIllnessObject:) @NSManaged public func removeFromIllness(_ value: Illness) -
Declaration
Swift
@objc(addIllness:) @NSManaged public func addToIllness(_ values: NSSet) -
Declaration
Swift
@objc(removeIllness:) @NSManaged public func removeFromIllness(_ values: NSSet)
-
Declaration
Swift
@objc(addInsulinObject:) @NSManaged public func addToInsulin(_ value: Insulin) -
Declaration
Swift
@objc(removeInsulinObject:) @NSManaged public func removeFromInsulin(_ value: Insulin) -
Declaration
Swift
@objc(addInsulin:) @NSManaged public func addToInsulin(_ values: NSSet) -
Declaration
Swift
@objc(removeInsulin:) @NSManaged public func removeFromInsulin(_ values: NSSet)
-
Declaration
Swift
@objc(addMealsObject:) @NSManaged public func addToMeals(_ value: Meals) -
Declaration
Swift
@objc(removeMealsObject:) @NSManaged public func removeFromMeals(_ value: Meals) -
Declaration
Swift
@objc(addMeals:) @NSManaged public func addToMeals(_ values: NSSet) -
Declaration
Swift
@objc(removeMeals:) @NSManaged public func removeFromMeals(_ values: NSSet)
-
Declaration
Swift
@objc(addStressObject:) @NSManaged public func addToStress(_ value: Stress) -
Declaration
Swift
@objc(removeStressObject:) @NSManaged public func removeFromStress(_ value: Stress) -
Declaration
Swift
@objc(addStress:) @NSManaged public func addToStress(_ values: NSSet) -
Declaration
Swift
@objc(removeStress:) @NSManaged public func removeFromStress(_ values: NSSet)
View on GitHub
Day Class Reference