Skip to content

Normative: Permit "unknown" DateTimeFormat/NumberFormat fields#245

Merged
littledan merged 1 commit intotc39:masterfrom
littledan:unknown
Jul 28, 2018
Merged

Normative: Permit "unknown" DateTimeFormat/NumberFormat fields#245
littledan merged 1 commit intotc39:masterfrom
littledan:unknown

Conversation

@littledan
Copy link
Copy Markdown
Member

In practice, libraries which underly ECMA-402 implementations may
implement much of algorithms such as PartitionNumberFormat and
PartitionDateTimeFormat. Sometimes, patterns from these algorithms
will include unexpected fields. To handle these cases, this patch
adds logic to represent them literally in the output of format
methods. formatToParts methods use the "unknown" field type.

This patch includes additional editorial/typo fixups:

  • Remove the previous logic to leave unrecognized fields in patterns
    in place (logic which was broken in DateTimeFormat)
  • Define ILD and ILND inline, to reduce confusion
  • Include some missing words in comparison

Closes #231

In practice, libraries which underly ECMA-402 implementations may
implement much of algorithms such as PartitionNumberFormat and
PartitionDateTimeFormat. Sometimes, patterns from these algorithms
will include unexpected fields. To handle these cases, this patch
adds logic to represent them literally in the output of `format`
methods. `formatToParts` methods use the "unknown" field type.

This patch includes additional editorial/typo fixups:
- Remove the previous logic to leave unrecognized fields in patterns
  in place (logic which was broken in DateTimeFormat)
- Define ILD and ILND inline, to reduce confusion
- Include some missing words in comparison
@littledan
Copy link
Copy Markdown
Member Author

cc @anba @jackhorton @jungshik

@littledan
Copy link
Copy Markdown
Member Author

@jackhorton reported in July's ECMA-402 meeting that this change is implemented in ChakraCore. The change has consensus within the group, and was reported in the July 2018 TC39 meeting with no concerns raised. It's not really possible to write test262 tests. Given all that, it's ready to land.

@littledan littledan merged commit b926b46 into tc39:master Jul 28, 2018
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Jul 26, 2019
…DateTimeFormat. r=jwalden

Nightly-only for now until the open spec issues are addressed.

Drive-by change:
Implement the "unknown" parts change from <tc39/ecma402#245>.

Differential Revision: https://phabricator.services.mozilla.com/D38992

--HG--
extra : moz-landing-system : lando
dbaron pushed a commit to dbaron/gecko that referenced this pull request Jul 26, 2019
…DateTimeFormat. r=jwalden

Nightly-only for now until the open spec issues are addressed.

Drive-by change:
Implement the "unknown" parts change from <tc39/ecma402#245>.

Differential Revision: https://phabricator.services.mozilla.com/D38992
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this pull request Oct 4, 2019
…DateTimeFormat. r=jwalden

Nightly-only for now until the open spec issues are addressed.

Drive-by change:
Implement the "unknown" parts change from <tc39/ecma402#245>.

Differential Revision: https://phabricator.services.mozilla.com/D38992

UltraBlame original commit: 74572aae39b00195dff4fdd7eef73eb7c28f1065
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this pull request Oct 4, 2019
…DateTimeFormat. r=jwalden

Nightly-only for now until the open spec issues are addressed.

Drive-by change:
Implement the "unknown" parts change from <tc39/ecma402#245>.

Differential Revision: https://phabricator.services.mozilla.com/D38992

UltraBlame original commit: 74572aae39b00195dff4fdd7eef73eb7c28f1065
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this pull request Oct 4, 2019
…DateTimeFormat. r=jwalden

Nightly-only for now until the open spec issues are addressed.

Drive-by change:
Implement the "unknown" parts change from <tc39/ecma402#245>.

Differential Revision: https://phabricator.services.mozilla.com/D38992

UltraBlame original commit: 74572aae39b00195dff4fdd7eef73eb7c28f1065
bhearsum pushed a commit to mozilla-releng/staging-firefox that referenced this pull request May 1, 2025
…DateTimeFormat. r=jwalden

Nightly-only for now until the open spec issues are addressed.

Drive-by change:
Implement the "unknown" parts change from <tc39/ecma402#245>.

Differential Revision: https://phabricator.services.mozilla.com/D38992
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.

Handling unexpected ICU field IDs

1 participant