Instance Method

dateComponentsForCalendar:

Date components that uniquely identify the day represented by the summary object.

Declaration

- (NSDateComponents *)dateComponentsForCalendar:(NSCalendar *)calendar;

Parameters

calendar

The calendar used to calculate the date components.

Return Value

Date components that uniquely specify a day. For example, for the Gregorian calendar, the date components consist of only the era, year, month, and day.

Discussion

Each activity summary covers a single day. The day always begins and ends at midnight; however, the day may be longer or shorter than 24 hours (for example, if the user traveled across time zones).

See Also

Accessing the Summary’s Data

activeEnergyBurned

The amount of active energy that the user has burned during the specified day.

activeEnergyBurnedGoal

The user’s daily goal for active energy burned.

appleExerciseTime

The amount of time that the user has spent exercising during the specified day.

appleExerciseTimeGoal

The user’s daily exercise goal.

appleStandHours

The number of stand hours that the user has earned during the specified day.

appleStandHoursGoal

The user’s daily goal for stand hours.

HKCategoryValueAppleStandHour

Categories used to indicate whether the user stood during the sample’s duration.