Contents

statistics(for:)

Returns the statistics object for the time interval that contains the provided date.

Declaration

func statistics(for date: Date) -> HKStatistics?

Parameters

  • date:

    The target date.

Return Value

A statistics object for the time interval containing the provided date. If there are no samples for the selected time interval, the statistics object has a nil-valued quantity.

See Also

Accessing Statistics Collections