Skip to content

Enable Intl.Era-monthcode and implement 7 new calendar systems (+2,498 test262 passes)#2344

Merged
lahma merged 3 commits into
sebastienros:mainfrom
lahma:more-test262
Mar 22, 2026
Merged

Enable Intl.Era-monthcode and implement 7 new calendar systems (+2,498 test262 passes)#2344
lahma merged 3 commits into
sebastienros:mainfrom
lahma:more-test262

Conversation

@lahma

@lahma lahma commented Mar 22, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Enable Intl.Era-monthcode feature in test262 suite, adding ~3,000 new test cases
  • Implement 7 new calendar systems in NonIsoCalendars.cs: Coptic, Ethiopic, EthioAA (13-month epoch-day arithmetic), Indian/Saka, Islamic Umm al-Qura (via .NET UmAlQuraCalendar), Islamic Civil, Islamic Tbla
  • Fix Buddhist/ROC year conversion in CalendarDateToISO and PlainYearMonth constructors
  • Fix Japanese era determination to use full date boundaries (month/day, not just year)
  • Fix CalendarDateUntil wrapping for constrained days and leap months across all non-ISO calendars
  • Fix Islamic calendar month formula (replace approximate ceil formula with exact cumulative month lengths)
  • Support era/eraYear in with() for PlainDate, PlainDateTime, PlainYearMonth

Result: 95,798 passed (+2,498 from 93,300 baseline), 0 failures, 294 remaining era exclusions for future work

Test plan

  • Full test262 suite passes with 0 failures (95,798 passed, 1,553 skipped)
  • Jint.Tests main suite passes (2,764 passed on net10.0, 2,717 on net472)
  • No regressions in non-era test cases
  • Calendar round-trip verification for all 13 supported calendars

🤖 Generated with Claude Code

lahma and others added 3 commits March 22, 2026 10:45
…lendars (+2,362 test262 passes)

- Remove Intl.Era-monthcode from ExcludedFeatures, enabling ~3,000 new test cases
- Implement Coptic, Ethiopic, EthioAA calendars (13-month epoch-day arithmetic)
- Implement Indian (Saka) calendar with March 22 new year
- Implement Islamic Umm al-Qura calendar via .NET UmAlQuraCalendar
- Move Islamic Civil/Tbla from TemporalHelpers to NonIsoCalendars with full
  CalendarDateAdd/CalendarDateUntil support
- Fix Buddhist/ROC year conversion in CalendarDateToISO and PlainYearMonth
- Fix Japanese era determination to use full date boundaries (month/day)
- Fix Islamic epoch consistency (off-by-one) and tbla IsoToCalendarDate epoch
- Fix Islamic month extraction to match forward JDN formula
- Fix backward month counting in CalendarDateUntil for cross-year differences
- Fix CalendarDateUntil wrapping-at-end-of-month for constrained days
- Support era/eraYear in with() for PlainDate, PlainDateTime, PlainYearMonth
- Route buddhist/roc/japanese with() through CalendarDateToISO

Result: 95,662 passed (+2,362), 0 failures, 362 remaining era exclusions

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ing (+148 tests)

- Fix backward month counting direction in CalendarDateUntil
- Fix year wrapping: constrained day prevents counting a full year
- Fix month wrapping: constrained day prevents counting a full month
  (matches ISO ISODateSurpasses behavior for non-ISO calendars)
- Replace Islamic ceil(29.5001) month approximation with exact cumulative
  month lengths (30,29,30,29...) in both forward and inverse conversion
- Fix month extraction in IslamicCivilToCalendarDate to use cumulative
  month boundaries matching IslamicToJdn

Result: 95,810 passed (+2,510 from baseline), 288 remaining era exclusions

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…onths

- Year constraining now checks MonthCode (not ordinal Month) to properly
  detect leap month constraining (e.g., M05L → M05 when target year has
  no leap month should not count as 1 year)
- Month constraining checks day direction to detect day-at-end-of-month
  wrapping without false positives for intercalary month transitions

Result: 95,798 passed (+2,498 from baseline), 294 remaining era exclusions

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@lahma
lahma enabled auto-merge (squash) March 22, 2026 08:47
@lahma
lahma merged commit b051ed0 into sebastienros:main Mar 22, 2026
4 checks passed
@lahma
lahma deleted the more-test262 branch March 22, 2026 09:05
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.

1 participant