You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
by default different Calendar.Identifier values have different Calendar.current.firstWeekday.
Also there is a possibility to choose any day as start of week in Settings.
Suggesting to change this code
var weekday: Int { return dateComponents.weekday! }
by adding dependency on Calendar.current.firstWeekday
var weekday: Int { return (dateComponents.weekday! - Calendar.current.firstWeekday + 7) % 7 + 1 }
The text was updated successfully, but these errors were encountered:
by default different Calendar.Identifier values have different Calendar.current.firstWeekday.
Also there is a possibility to choose any day as start of week in Settings.
Suggesting to change this code
var weekday: Int { return dateComponents.weekday! }
by adding dependency on Calendar.current.firstWeekday
var weekday: Int { return (dateComponents.weekday! - Calendar.current.firstWeekday + 7) % 7 + 1 }
The text was updated successfully, but these errors were encountered: