Hi,
I'm trying to implement a dynamic calendar where the first day of the week will be based on the locale, unfortunately, it seems NSLocale doesn't conform with the regions in the world, only works for US, for example:
NSCalendar *calendar = [NSCalendar currentCalendar];
NSLocale *locale = [NSLocale localeWithLocaleIdentifier:@"pt_BR"];
[calendar setLocale:locale];
NSLog(@"firstDayOfWeek: %@", [calendar firstWeekday]); // Returns 2, which is Monday but in Brazil the first day of week is Sunday, it should return 1
NSCalendar *calendar = [NSCalendar currentCalendar];
NSLocale *locale = [NSLocale localeWithLocaleIdentifier:@"en_US"];
[calendar setLocale:locale];
NSLog(@"firstDayOfWeek: %@", [calendar firstWeekday]); // Returns 1, which is correct for United States
Does anybody know which standard the NSLocale follows to return on the first day of the week?