-
Notifications
You must be signed in to change notification settings - Fork 108
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
Normative: Add "microsecond" and "nanosecond" to IsSanctionedSingleUnitIdentifier #708
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FrankYFTang
changed the title
Add "microsecond" and "nanosecond" to IsSanctionedSingleUnitIdentifier
Normative: Add "microsecond" and "nanosecond" to IsSanctionedSingleUnitIdentifier
Aug 30, 2022
ryzokuken
approved these changes
Aug 30, 2022
trflynn89
added a commit
to trflynn89/serenity
that referenced
this pull request
Aug 31, 2022
This is a normative change in the ECMA-402 spec. See: tc39/ecma402#708
trflynn89
added a commit
to trflynn89/serenity
that referenced
this pull request
Aug 31, 2022
This is a normative change in the ECMA-402 spec. See: tc39/ecma402#708
webkit-early-warning-system
pushed a commit
to Constellation/WebKit
that referenced
this pull request
Sep 23, 2022
https://bugs.webkit.org/show_bug.cgi?id=214794 <rdar://66436701> Reviewed by Ross Kirsling. This patch implements Intl.DurationFormat[1], which is now stage-3 feature. It is decoupled from Temporal now: it can take an object with `hours` etc. properties, and generate formatted string for duration. In the future, it will accept Temporal.Duration too. 1. We add new microsecond and nanosecond units because they are necessary to DurationFormat[2]. 2. Implement Intl.DurationFormat with UNumberFormatter and UListFormatter. [1]: https://github.com/tc39/proposal-intl-duration-format [2]: tc39/ecma402#708 * JSTests/stress/intl-durationformat-basic.js: Added. (shouldBe): (shouldBeOneOf): (shouldBeForICUVersion): (shouldNotThrow): (shouldThrow): * JSTests/stress/intl-durationformat-digital.js: Added. (shouldBe): (throw.new.Error): * JSTests/stress/intl-durationformat-format-to-parts.js: Added. (shouldBe): (shouldBeOneOf): (shouldBeForICUVersion): (shouldNotThrow): (shouldThrow): (throw.new.Error): * JSTests/stress/intl-durationformat.js: Added. (shouldBe): (shouldNotThrow): (shouldThrow): (test.DerivedDurationFormat): (test.get shouldThrow): (test): * JSTests/stress/intl-enumeration.js: * JSTests/test262/config.yaml: * JSTests/test262/expectations.yaml: * Source/JavaScriptCore/CMakeLists.txt: * Source/JavaScriptCore/DerivedSources-input.xcfilelist: * Source/JavaScriptCore/DerivedSources-output.xcfilelist: * Source/JavaScriptCore/DerivedSources.make: * Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj: * Source/JavaScriptCore/Sources.txt: * Source/JavaScriptCore/heap/Heap.cpp: (JSC::Heap::Heap): * Source/JavaScriptCore/heap/Heap.h: * Source/JavaScriptCore/heap/HeapSubspaceTypes.h: * Source/JavaScriptCore/runtime/CommonIdentifiers.h: * Source/JavaScriptCore/runtime/IntlDurationFormat.cpp: Added. (JSC::IntlDurationFormat::create): (JSC::IntlDurationFormat::createStructure): (JSC::IntlDurationFormat::IntlDurationFormat): (JSC::IntlDurationFormat::finishCreation): (JSC::intlDurationUnitOptions): (JSC::displayName): (JSC::IntlDurationFormat::initializeDurationFormat): (JSC::ListFormatInput::ListFormatInput): (JSC::ListFormatInput::size const): (JSC::ListFormatInput::stringPointers const): (JSC::ListFormatInput::stringLengths const): (JSC::retrieveSeparator): (JSC::collectElements): (JSC::IntlDurationFormat::format const): (JSC::IntlDurationFormat::formatToParts const): (JSC::IntlDurationFormat::resolvedOptions const): (JSC::IntlDurationFormat::styleString): (JSC::IntlDurationFormat::unitStyleString): (JSC::IntlDurationFormat::displayString): * Source/JavaScriptCore/runtime/IntlDurationFormat.h: Added. * Source/JavaScriptCore/runtime/IntlDurationFormatConstructor.cpp: Added. (JSC::IntlDurationFormatConstructor::create): (JSC::IntlDurationFormatConstructor::createStructure): (JSC::IntlDurationFormatConstructor::IntlDurationFormatConstructor): (JSC::IntlDurationFormatConstructor::finishCreation): (JSC::JSC_DEFINE_HOST_FUNCTION): * Source/JavaScriptCore/runtime/IntlDurationFormatConstructor.h: Added. * Source/JavaScriptCore/runtime/IntlDurationFormatPrototype.cpp: Added. (JSC::IntlDurationFormatPrototype::create): (JSC::IntlDurationFormatPrototype::createStructure): (JSC::IntlDurationFormatPrototype::IntlDurationFormatPrototype): (JSC::IntlDurationFormatPrototype::finishCreation): (JSC::JSC_DEFINE_HOST_FUNCTION): * Source/JavaScriptCore/runtime/IntlDurationFormatPrototype.h: Added. * Source/JavaScriptCore/runtime/IntlObject.cpp: (JSC::createDurationFormatConstructor): (JSC::IntlObject::finishCreation): * Source/JavaScriptCore/runtime/IntlObject.h: (JSC::intlDurationFormatAvailableLocales): * Source/JavaScriptCore/runtime/JSGlobalObject.cpp: (JSC::JSGlobalObject::init): * Source/JavaScriptCore/runtime/JSGlobalObject.h: (JSC::JSGlobalObject::durationFormatStructure): Canonical link: https://commits.webkit.org/254791@main
moz-v2v-gh
pushed a commit
to mozilla/gecko-dev
that referenced
this pull request
Nov 10, 2022
…dminor Steps performed: - Add "microsecond" and "nanosecond" to "intl/icu/data_filter.json". - Run "icu_sources_data.py" to update the ICU data file. - Run "update-tzdata.sh" to reapply the tzdata 2022f changes. - Add "microsecond" and "nanosecond" to "SanctionedSimpleUnitIdentifiers.yaml". - Run "make_intl_data.py units" to regenerate additional SpiderMonkey files. Spec PR: tc39/ecma402#708 Differential Revision: https://phabricator.services.mozilla.com/D161676
jamienicol
pushed a commit
to jamienicol/gecko
that referenced
this pull request
Nov 11, 2022
…dminor Steps performed: - Add "microsecond" and "nanosecond" to "intl/icu/data_filter.json". - Run "icu_sources_data.py" to update the ICU data file. - Run "update-tzdata.sh" to reapply the tzdata 2022f changes. - Add "microsecond" and "nanosecond" to "SanctionedSimpleUnitIdentifiers.yaml". - Run "make_intl_data.py units" to regenerate additional SpiderMonkey files. Spec PR: tc39/ecma402#708 Differential Revision: https://phabricator.services.mozilla.com/D161676
Clownsw
pushed a commit
to Clownsw/v8
that referenced
this pull request
Nov 18, 2022
Implement 402 PR708 tc39/ecma402#708 Bug: v8:13506 Change-Id: I9705e3b2f0bc36c8a34f84de757f69546db28da4 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4035495 Reviewed-by: Shu-yu Guo <[email protected]> Commit-Queue: Frank Tang <[email protected]> Cr-Commit-Position: refs/heads/main@{#84346}
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Address #702 and needed by tc39/proposal-intl-duration-format#122