-
Notifications
You must be signed in to change notification settings - Fork 163
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Editorial: Consider recombining ISO 8601 and calendar-specific operations #2948
Comments
ptomato
added a commit
that referenced
this issue
Oct 4, 2024
This is the only place it's called from. This refactor is part of consolidating the many calendar AOs. See: #2948
ptomato
added a commit
that referenced
this issue
Oct 4, 2024
This is the only place it's called from. This refactor is part of consolidating the many calendar AOs. See: #2948
ptomato
added a commit
that referenced
this issue
Oct 4, 2024
This is the only place it's called from. This refactor is part of consolidating the many calendar AOs. See: #2948
ptomato
added a commit
that referenced
this issue
Oct 4, 2024
This is the only place it's called from. This refactor is part of consolidating the many calendar AOs. See: #2948
ptomato
added a commit
that referenced
this issue
Oct 5, 2024
This is the only place it's called from. This refactor is part of consolidating the many calendar AOs. See: #2948
ptomato
added a commit
that referenced
this issue
Oct 5, 2024
This is the only place it's called from. This refactor is part of consolidating the many calendar AOs. See: #2948
ptomato
added a commit
that referenced
this issue
Oct 5, 2024
This is the only place it's called from. This refactor is part of consolidating the many calendar AOs. See: #2948
ptomato
added a commit
that referenced
this issue
Oct 5, 2024
This is the only place it's called from. This refactor is part of consolidating the many calendar AOs. See: #2948
ptomato
added a commit
that referenced
this issue
Oct 5, 2024
They are identical except for clamping the day value, so if we pass 1 as the day value we get the same effect. The only caller was in CalendarYearMonthFromFields. See: #2948
ptomato
added a commit
that referenced
this issue
Oct 5, 2024
This is the only place it's called from. This refactor is part of consolidating the many calendar AOs. See: #2948
ptomato
added a commit
that referenced
this issue
Oct 5, 2024
Move the ISO 8601 code from CalendarDateFromFields and CalendarYearMonthFromFields into CalendarDateToISO. At this point it just consists of RegulateISODate anyway. To achieve this, we also drop the requirement that CalendarDateToISO checks its return value is in the representable range, instead moving that to CalendarDateFromFields and CalendarYearMonthFromFields since it is different in both cases. See: #2948
ptomato
added a commit
that referenced
this issue
Oct 5, 2024
…ceDate Move the ISO 8601 code from CalendarMonthDayFromFields into CalendarMonthDayToISOReferenceDate. See: #2948
ptomato
added a commit
that referenced
this issue
Oct 5, 2024
Having two separate operations for this was already confusing just because of the names. Combine them into an ISO 8601 part and an implementation- defined part, as in CalendarDateToISO. See: #2948
ptomato
added a commit
that referenced
this issue
Oct 5, 2024
Having two separate operations for this was already confusing just because of the names. Combine them into an ISO 8601 part and an implementation- defined part, as in CalendarDateAdd. In this case there was not really any specific implementation-defined description except for the already existing description. See: #2948
ptomato
added a commit
that referenced
this issue
Oct 5, 2024
Move the ISO 8601-specific code from CalendarEra, CalendarYear, etc., into CalendarISOToDate. See: #2948
ptomato
added a commit
that referenced
this issue
Oct 5, 2024
ISO 8601 has no extra fields, so just return an empty List from the operation instead of asserting that we don't call it with the ISO 8601 calendar. See: #2948
ptomato
added a commit
that referenced
this issue
Oct 5, 2024
Move the ISO 8601 code from ISOFieldKeysToIgnore into CalendarFieldKeysToIgnore. See: #2948
ptomato
added a commit
that referenced
this issue
Oct 5, 2024
Move the ISO 8601 code from ISOResolveMonth into CalendarResolveFields. See: #2948
ptomato
added a commit
that referenced
this issue
Oct 5, 2024
These were all one line now, and should just call CalendarISOToDate. See: #2948
ptomato
added a commit
that referenced
this issue
Oct 7, 2024
Move the ISO 8601 code from CalendarDateFromFields and CalendarYearMonthFromFields into CalendarDateToISO. At this point it just consists of RegulateISODate anyway. To achieve this, we also drop the requirement that CalendarDateToISO checks its return value is in the representable range, instead moving that to CalendarDateFromFields and CalendarYearMonthFromFields since it is different in both cases. See: #2948 Closes: #2998
ptomato
added a commit
that referenced
this issue
Oct 7, 2024
…ceDate Move the ISO 8601 code from CalendarMonthDayFromFields into CalendarMonthDayToISOReferenceDate. See: #2948
ptomato
added a commit
that referenced
this issue
Oct 7, 2024
Having two separate operations for this was already confusing just because of the names. Combine them into an ISO 8601 part and an implementation- defined part, as in CalendarDateToISO. See: #2948
ptomato
added a commit
that referenced
this issue
Oct 7, 2024
Having two separate operations for this was already confusing just because of the names. Combine them into an ISO 8601 part and an implementation- defined part, as in CalendarDateAdd. In this case there was not really any specific implementation-defined description except for the already existing description. See: #2948
ptomato
added a commit
that referenced
this issue
Oct 7, 2024
Move the ISO 8601-specific code from CalendarEra, CalendarYear, etc., into CalendarISOToDate. See: #2948
ptomato
added a commit
that referenced
this issue
Oct 7, 2024
ISO 8601 has no extra fields, so just return an empty List from the operation instead of asserting that we don't call it with the ISO 8601 calendar. See: #2948
ptomato
added a commit
that referenced
this issue
Oct 7, 2024
Move the ISO 8601 code from ISOFieldKeysToIgnore into CalendarFieldKeysToIgnore. See: #2948
ptomato
added a commit
that referenced
this issue
Oct 7, 2024
Move the ISO 8601 code from ISOResolveMonth into CalendarResolveFields. See: #2948
ptomato
added a commit
that referenced
this issue
Oct 7, 2024
These were all one line now, and should just call CalendarISOToDate. See: #2948
ptomato
added a commit
that referenced
this issue
Oct 7, 2024
This is the only place it's called from. This refactor is part of consolidating the many calendar AOs. See: #2948
ptomato
added a commit
that referenced
this issue
Oct 7, 2024
This is the only place it's called from. This refactor is part of consolidating the many calendar AOs. See: #2948
ptomato
added a commit
that referenced
this issue
Oct 7, 2024
This is the only place it's called from. This refactor is part of consolidating the many calendar AOs. See: #2948
ptomato
added a commit
that referenced
this issue
Oct 7, 2024
This is the only place it's called from. This refactor is part of consolidating the many calendar AOs. See: #2948
ptomato
added a commit
that referenced
this issue
Oct 7, 2024
They are identical except for clamping the day value, so if we pass 1 as the day value we get the same effect. The only caller was in CalendarYearMonthFromFields. See: #2948
ptomato
added a commit
that referenced
this issue
Oct 7, 2024
This is the only place it's called from. This refactor is part of consolidating the many calendar AOs. See: #2948
ptomato
added a commit
that referenced
this issue
Oct 7, 2024
Move the ISO 8601 code from CalendarDateFromFields and CalendarYearMonthFromFields into CalendarDateToISO. At this point it just consists of RegulateISODate anyway. To achieve this, we also drop the requirement that CalendarDateToISO checks its return value is in the representable range, instead moving that to CalendarDateFromFields and CalendarYearMonthFromFields since it is different in both cases. See: #2948 Closes: #2998
ptomato
added a commit
that referenced
this issue
Oct 7, 2024
…ceDate Move the ISO 8601 code from CalendarMonthDayFromFields into CalendarMonthDayToISOReferenceDate. See: #2948
ptomato
added a commit
that referenced
this issue
Oct 7, 2024
Having two separate operations for this was already confusing just because of the names. Combine them into an ISO 8601 part and an implementation- defined part, as in CalendarDateToISO. See: #2948
ptomato
added a commit
that referenced
this issue
Oct 7, 2024
Having two separate operations for this was already confusing just because of the names. Combine them into an ISO 8601 part and an implementation- defined part, as in CalendarDateAdd. In this case there was not really any specific implementation-defined description except for the already existing description. See: #2948
ptomato
added a commit
that referenced
this issue
Oct 7, 2024
Move the ISO 8601-specific code from CalendarEra, CalendarYear, etc., into CalendarISOToDate. See: #2948
ptomato
added a commit
that referenced
this issue
Oct 7, 2024
ISO 8601 has no extra fields, so just return an empty List from the operation instead of asserting that we don't call it with the ISO 8601 calendar. See: #2948
ptomato
added a commit
that referenced
this issue
Oct 7, 2024
Move the ISO 8601 code from ISOFieldKeysToIgnore into CalendarFieldKeysToIgnore. See: #2948
ptomato
added a commit
that referenced
this issue
Oct 7, 2024
Move the ISO 8601 code from ISOResolveMonth into CalendarResolveFields. See: #2948
ptomato
added a commit
that referenced
this issue
Oct 7, 2024
These were all one line now, and should just call CalendarISOToDate. See: #2948
ptomato
added a commit
that referenced
this issue
Oct 8, 2024
ISOMonthCode was only used in CalendarISOToDate and in an assertion which didn't really need to be there. See: #2948
Ms2ger
pushed a commit
that referenced
this issue
Oct 8, 2024
ISOMonthCode was only used in CalendarISOToDate and in an assertion which didn't really need to be there. See: #2948
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
We have several operations such as CalendarDateAdd that basically say this:
where DoTheISO8601Thing is a completely specified AO like AddISODate and DoTheCalendarThing is an implementation-dependent AO like CalendarDateAddition. This split seems unnecessary and could probably make the spec text simpler if we had just one operation instead of three. Investigate whether this is an improvement and if so, prepare a PR.
The text was updated successfully, but these errors were encountered: