I live in the Netherlands. We Dutch love to see Monday as the beginning of the week. I know that people in the US like to see Sunday as the beginning of the week. Stupid Americans;)
If I want to present a weekly review to my global users, can I get the preferred starting day of the week from NSLocale or is the settings panel the only way to go?
Cheers, EP.
Use the following code:
NSCalendar *calendar = [[NSLocale currentLocale] objectForKey:NSLocaleCalendar]; NSUInteger firstDay = [calendar firstWeekday];
You can also check this related question.
. :
NSCalendar *calendar = [[NSLocale currentLocale] objectForKey:NSLocaleCalendar]; self.weekStartsOnDay = [calendar firstWeekday];
, , NSLocaleCalendar, .