Skip to content
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: Add two more required formats #948

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

anba
Copy link
Contributor

@anba anba commented Dec 10, 2024

This makes format selection in BasicFormatMatcher unambiguous when requesting the following two formats:

  1. Standalone "month":

There's currently a tie between "year, month" and "month, day". Adding standalone "month" as a required format resolves this tie.

  1. "dayPeriod, hour, minute, second, fractionalSecondDigits":

There's a tie between "hour, minute, second, fractionalSecondDigits" and "dayPeriod, hour, minute, second". Requiring a format which has both "dayPeriod" and "fractionalSecondDigits" resolves this tie.

This makes format selection in BasicFormatMatcher unambiguous when
requesting the following two formats:

1. Standalone "month":

There's currently a tie between "year, month" and "month, day". Adding
standalone "month" as a required format resolves this tie.

2. "dayPeriod, hour, minute, second, fractionalSecondDigits":

There's a tie between "hour, minute, second, fractionalSecondDigits" and
"dayPeriod, hour, minute, second". Requiring a format which has both
"dayPeriod" and "fractionalSecondDigits" resolves this tie.
Copy link
Contributor

@sffc sffc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM but is it editorial?

@anba
Copy link
Contributor Author

anba commented Dec 13, 2024

If we consider these ties as spec bugs, I'd say this is editorial. Otherwise it's normative, because it adds new requirements for implementations. Except no (non-experimental) implementation actually implements BasicFormatMatcher, so implementers can likely just ignore this PR.

(Even if there's no actual implementation for BasicFormatMatcher, it's still useful to keep it in the spec, because it defines the minimum requirements for BestFitFormatMatcher.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants