I'm trying to get a standard gregorian calendar. To my understanding
let cal = Calendar(identifier: .gregorian)
should give me a standard gregorian calendar.
cal.component(.weekday, from: Date()) is returning wrong values.
["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], so it seems that the week is starting on Sundays. However according to international standards, namely ISO 8601:2004 which is cited in the documentation of NSCalendar to which the Calendar object bridges, a week should start with Monday as day 1 and end with Sunday as day 7.
From ISO 8601:2004
calendar day of the week is represented by one decimal digit. Monday shall be identified as calendar day  of any calendar week, and subsequent calendar days of the same calendar week shall be numbered in ascending sequence to Sunday (calendar day ).
This was causing some serious confusion when communicating with an API that is parsing dates according to the ISO standard. Took me a while to pin the problem to the calendar object ...
Am I missing something? Is this not the correct way to get a standard calendar?
Thanks for your help.