From the documentation:

kCFCalendarUnitDay

Specifies the day unit.

and

kCFCalendarUnitWeekday

Specifies the weekday unit. The weekday units are the numbers 1-N (where for the Gregorian calendar N=7 and 1 is Sunday).

I wanted an alarm to go off from Monday to Friday and I thought that kCFCalendarUnitWeekday was what I needed, until I woke up this Saturday :) Can someone explain what is the difference between these two, as the documentation doesn't seem very helpful to me.

有帮助吗?

解决方案

kCFCalendarUnitDay specifies the day of the month, i.e. a number between 1 and 31 in the Gregorian Calendar.

kCFCalendarUnitWeekday specifies the day of the week, i.e. a number between 1 (Sunday) and 7 (Saturday) in the Gregorian Calendar.

until I woke up this Saturday

Can you show us some code?

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top