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

DurationFormat tables are too wide #965

Open
gibson042 opened this issue Mar 1, 2025 · 0 comments · May be fixed by #972
Open

DurationFormat tables are too wide #965

gibson042 opened this issue Mar 1, 2025 · 0 comments · May be fixed by #972

Comments

@gibson042
Copy link
Contributor

gibson042 commented Mar 1, 2025

The tables in Intl.DurationFormat and PartitionDurationFormatPattern have separate columns for Style Slot and Display Slot, making them excessively wide and hindering readability of the rendered PDF (although thankfully not overflowing AFAICT). I think the situation would be improved by replacing DurationFormat [[${Unit}Style]]/[[${Unit}Display]] slot pairs with [[${Unit}Options]] slots containing the { [[Style]], [[Display]] } Records returned by GetDurationUnitOptions:

Slot Unit Values Digital Default
[[YearsOptions]] "years" « "long", "short", "narrow" » "short"
[[MonthsOptions]] "months" « "long", "short", "narrow" » "short"
[[WeeksOptions]] "weeks" « "long", "short", "narrow" » "short"
[[DaysOptions]] "days" « "long", "short", "narrow" » "short"
[[HoursOptions]] "hours" « "long", "short", "narrow", "numeric", "2-digit" » "numeric"

I expect such a change to simplify the Intl.DurationFormat constructor steps as well.

gibson042 added a commit to gibson042/ecma402 that referenced this issue Mar 3, 2025
… slots with [[${Unit}Options]]

...with Duration Unit Options Records values
Fixes tc39#965
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant