Skip to content

Update expected formatting for CLDR 46#4342

Merged
ptomato merged 1 commit intotc39:mainfrom
anba:temporal-staging-intl402
Jan 31, 2025
Merged

Update expected formatting for CLDR 46#4342
ptomato merged 1 commit intotc39:mainfrom
anba:temporal-staging-intl402

Conversation

@anba
Copy link
Contributor

@anba anba commented Dec 12, 2024

No description provided.

@anba anba requested review from a team as code owners December 12, 2024 17:15
Copy link
Contributor

@ptomato ptomato left a comment

Choose a reason for hiding this comment

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

Happy to merge as-is once we give CLDR 46 a bit of time to percolate.

Alternatively, we could just make t2 be in a 2-digit month, and update the expected results accordingly. That would sidestep the issue, since it is irrelevant for spec compliance whether the leading 0 is printed or not. I'd prefer that, but it's also fine if you don't have more time to spend on this.

@anba
Copy link
Contributor Author

anba commented Jan 21, 2025

Changing optionsAT to use month: "2-digit" doesn't seem to work:

  1. Using only { month: "2-digit", timeZone: onlyOnce("Europe/Vienna") } doesn't work because other date-time parts are now missing which are required for other tests in this file.
  2. Using { year: "numeric", month: "2-digit", day: "numeric", hour: "numeric", minute: "numeric", second: "numeric", timeZone: onlyOnce("Europe/Vienna") } allows to pass more tests, but then this test fails:
assert.sameValue(at.format(t.withCalendar(atCalendar).toPlainYearMonth()), `11${deMonthYearSeparator}1976`);

Because deMonthYearSeparator can either be "/" or "." depending on the month format:

@linusg
Copy link
Member

linusg commented Jan 21, 2025

Happy to merge as-is once we give CLDR 46 a bit of time to percolate.

Note that another update for CLDR 46 was already merged: #4283

@ptomato
Copy link
Contributor

ptomato commented Jan 31, 2025

@anba Rather than changing the format to month: "2-digit", I meant more like changing this line from month 02 to month 10 and updating the expectations accordingly, so that whether a leading zero is printed is irrelevant.

But again, it's fine to not do that. One day we will figure out a good way to make tests not depend on golden output.

@linusg I would've said the same thing about #4283, FWIW. But CLDR 46 has been out for >3 months and there's already a 46.1 release, so I think enough time has passed now.

@ptomato ptomato force-pushed the temporal-staging-intl402 branch from 640ed85 to cb37ce3 Compare January 31, 2025 01:23
@ptomato ptomato merged commit 0614bdb into tc39:main Jan 31, 2025
11 checks passed
@anba anba deleted the temporal-staging-intl402 branch May 17, 2025 13:48
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.

3 participants