I am using Tapku's calendar in my application and I want to determine if the week should start on a Sunday or a Monday depending on the user's settings. I am calling firstWeekday, but for some reason it returns 1 (Sunday) on a device where the built-in calendar starts the weeks on Mondays (and hence it should return 2):
NSCalendar* cal = [[NSCalendar alloc] initWithCalendarIdentifier:NSGregorianCalendar];
[cal firstWeekday];
Any suggestions as to what I might be missing?
The first day of the week for the calendar.
Ok, so it turns out this is the correct way of doing it:
[[NSCalendar currentCalendar] firstWeekday]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With