Skip to content

Conversation

@ptomato
Copy link
Collaborator

@ptomato ptomato commented Nov 14, 2025

Found these as I wrote tests for Intl Era Monthcode.

This was causing the overflow: "reject" to be ignored in leap month
coercion.
These error messages refer to "Chinese year" because they are in the
helperChinese object, but since helperDangi inherits from that it
results in odd error messages. Use ${this.id} instead.
Latest versions of Node have this "Mo" prefix in their ICU data, which
completely broke the Chinese and Dangi calendars.
@codecov
Copy link

codecov bot commented Nov 14, 2025

Codecov Report

❌ Patch coverage is 51.42857% with 17 lines in your changes missing coverage. Please review.
✅ Project coverage is 96.84%. Comparing base (c1f7bd5) to head (5d09e48).
⚠️ Report is 7 commits behind head on main.

Files with missing lines Patch % Lines
polyfill/lib/calendar.mjs 51.42% 16 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3185      +/-   ##
==========================================
- Coverage   96.96%   96.84%   -0.13%     
==========================================
  Files          22       22              
  Lines       10217    10235      +18     
  Branches     1841     1841              
==========================================
+ Hits         9907     9912       +5     
- Misses        261      273      +12     
- Partials       49       50       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

The check for the Indian calendar BCE bug included the literal string
"Saka", which has been changed to "Śaka" in the latest ICU data. Ignore
the formatted era name and just check the formatted date to see if the
host is vulnerable to the bug.
Copy link
Collaborator

@justingrant justingrant left a comment

Choose a reason for hiding this comment

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

Cool, thanks for catching these. I added a few questions, otherwise looks good.

CLDR has removed the "ERA0" code from the Coptic calendar but it looks
like they neglected to actually remove the era - if you try to format a
date with a negative era year, it prints a positive era year and omits
the era code (the final part of formatToParts() is a literal " " part,
which normally should be followed by an era part.) Handle this
eventuality with a special case.
We need to do the non-negative modulo here, otherwise all negative years
are leap years.
@ptomato ptomato merged commit 0df570c into main Nov 17, 2025
10 checks passed
@ptomato ptomato deleted the polyfill-fixups branch November 17, 2025 18:02
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