Align `DateError` with `DateFromFieldsError`
#7010
Adds DateError::MonthCodeNotInCalendar, DateError::MonthCodeNotInYear, docs, and flattens DateFromFieldsError::Range
As it stands this is a breaking change, yes?
no
Ah, I see, UnknownMonthCode is still around. There is a little bit of concern around splitting the error variants but I don't really think matching on these variants is that common.
I like this. I'm pretty ambivalent on the "nested RangeError or struct variant" thing, our design here has some mistakes but overall this is an extremely minor aspect of the API.
I'm against adding new variants to DateError if it causes existing call sites with non-exhaustive matching on error variants to start falling into the catchall variant.
And my position on the nested RangeError hasn't changed since last discussed in #7010.