Currently Weekday::num_days_from is only public inside the crate, but this function is useful for crates using this lib too.
For example I had to write some code with different behavior for the united states and how they handle some things different than ISO 8601 and I could have used num_days_from_monday and num_days_from_sunday to solve my problem... but this requires another if statement which I could remove if Weekday::num_days_from was public.
I'm pretty sure there are more use cases for this besides that.
Currently
Weekday::num_days_from
is only public inside the crate, but this function is useful for crates using this lib too. For example I had to write some code with different behavior for the united states and how they handle some things different than ISO 8601 and I could have usednum_days_from_monday
andnum_days_from_sunday
to solve my problem... but this requires another if statement which I could remove ifWeekday::num_days_from
was public. I'm pretty sure there are more use cases for this besides that.