Skip to content
This repository has been archived by the owner on Jan 25, 2022. It is now read-only.

Set field widths for date/timeStyle #52

Merged
merged 7 commits into from
Jun 12, 2020
Merged

Conversation

anba
Copy link
Contributor

@anba anba commented Jun 12, 2020

Fixes #45

#48 (comment) contains small descriptions for these commits.

anba added 7 commits June 12, 2020 09:25
… widths

Change [[DateFormat]] and [[TimeFormat]] to use a record instead of a simple
pattern. That way field widths (e.g. display "hour" as "2-digit") can be stored.
The returned record has the same structure as the one returned from
`BasicFormatMatcher` and `BestFitFormatMatcher`.
Unify the steps to initialise the internal slots of a DateTimeFormat object
from the format record.
This now happens as part of the normal hour-cycle computation steps.
This change from ECMA-402 is no longer needed.
… when date/timeStyle is used

The DateTimeFormat's internal slots for date-time compenents are now correctly
filled, so they need to explicitly filtered out in `resolvedOptions()`.
This change from ECMA-402 isn't needed anymore, too.
@zbraniecki zbraniecki self-requested a review June 12, 2020 17:42
Copy link
Member

@zbraniecki zbraniecki left a comment

Choose a reason for hiding this comment

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

lgtm! Thank you Anba!

@zbraniecki zbraniecki merged commit 3707c99 into tc39:master Jun 12, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Date-time field widths not set for PartitionDateTimePattern
2 participants