malcommac / SwiftDate

🐔 Toolkit to parse, validate, manipulate, compare and display dates, time & timezones in Swift.
MIT License
7.61k stars 767 forks source link

Fix for an issue that caused WeekStartDay to fail while initializing Region #786

Open Vignesh-Thangamariappan opened 2 years ago

Vignesh-Thangamariappan commented 2 years ago

Ref: https://github.com/malcommac/SwiftDate/issues/690

ExtremeMan commented 1 year ago

@malcommac this seems like a valid fix for a valid bug. Can we merge it? @Vignesh-Thangamariappan can you rebase?

ExtremeMan commented 1 year ago

Or return back this method? https://github.com/malcommac/SwiftDate/compare/4.5.1...5.0.0#diff-4ddb0e769834923d6d637cfe9c9974c5d6d2c0e17c1703ac9ec3b7eaae5f68a9L89-L96

    /// Identify the first weekday of the calendar.
    /// By default is `sunday`.
    public var firstWeekday: WeekDay {
        set {
            self.calendar.firstWeekday = newValue.rawValue
        }
        get {
            return WeekDay(rawValue: self.calendar.firstWeekday)!
        }
    }
Vignesh-Thangamariappan commented 1 year ago

Sure @ExtremeMan I'm on it

Vignesh-Thangamariappan commented 1 year ago

@malcommac Can you please review and merge these changes. Would be helpful for people facing #690