Skip to content

Drop the five Temporal members the proposal removed - #3014

Merged
lahma merged 1 commit into
sebastienros:mainfrom
lahma:fix/temporal-removed-members
Aug 14, 2026
Merged

Drop the five Temporal members the proposal removed#3014
lahma merged 1 commit into
sebastienros:mainfrom
lahma:fix/temporal-removed-members

Conversation

@lahma

@lahma lahma commented Aug 14, 2026

Copy link
Copy Markdown
Collaborator

#2996 dropped the Temporal.Now methods the proposal removed. Five more members from the same June 2024 removals were still exposed; this takes them out.

  • Temporal.PlainDateTime.prototype.withPlainDate
  • Temporal.ZonedDateTime.prototype.epochSeconds
  • Temporal.ZonedDateTime.prototype.epochMicroseconds
  • Temporal.ZonedDateTime.prototype.toPlainYearMonth
  • Temporal.ZonedDateTime.prototype.toPlainMonthDay

None of them appears in the live proposal. Properties of the Temporal.PlainDateTime Prototype Object lists 22 accessors and 17 methods, withPlainTime among them and no withPlainDate. Properties of the Temporal.ZonedDateTime Prototype Object lists 28 accessors and 21 methods, with epochMilliseconds and epochNanoseconds the only two epoch accessors and toPlainDate / toPlainTime / toPlainDateTime the only three toPlain* methods. With the five gone, Object.getOwnPropertyNames reports 39 names on PlainDateTime.prototype and 49 on ZonedDateTime.prototype, matching those lists name for name.

This is breaking for anyone calling them, which is why it lands early in the 4.16 cycle rather than late. The replacements are what the proposal points at: pdt.withPlainDate(d) becomes d.toPlainDateTime(pdt.toPlainTime()), zdt.epochSeconds becomes zdt.epochMilliseconds / 1000 (floored) or zdt.epochNanoseconds / 1_000_000_000n, zdt.epochMicroseconds becomes zdt.epochNanoseconds / 1000n, and zdt.toPlainYearMonth() / zdt.toPlainMonthDay() become zdt.toPlainDate().toPlainYearMonth() / zdt.toPlainDate().toPlainMonthDay(), both of which PlainDate.prototype keeps.

Nothing is orphaned. FloorDivide sits between the two removed accessors and still serves epochMilliseconds, so the deletion is not one contiguous block. ToTemporalDate, and the IsoDate overloads of PlainYearMonthConstructor.Construct and PlainMonthDayConstructor.Construct, all keep other callers. Deleting the attributed method is the whole edit — Jint.SourceGenerators/ObjectGenerator emits the property table and computes the BuiltinShape.Builder capacity from the attributes, so the regenerated shapes went to 39 and 49 on their own with no hand-written count to decrement.

test262

No exclusion was needed. At the pinned SHA (3655e7464de3d52643ecddd4b5f9f4f3e7f62398) all five test directories are already gone upstream — built-ins/Temporal/PlainDateTime/prototype/withPlainDate, and built-ins/Temporal/ZonedDateTime/prototype/{epochSeconds,epochMicroseconds,toPlainYearMonth,toPlainMonthDay}. Nothing else in built-ins/ or intl402/ reaches these members; the remaining toPlainYearMonth / toPlainMonthDay hits are all on PlainDate.prototype, which keeps them. The only place the suite asserts their absence is staging/Temporal/removed-methods.js, and Jint's harness generates annexB, built-ins, intl402 and language only — so, exactly as in #2996, nothing in the suite was holding the line. TemporalRemovedMembersTests pins both full property lists instead, and cites that staging file.

Pre-fix failure

The test was written first and run against the unfixed engine. 7 of its 8 cases failed; the eighth is the survivors control, which passes either way:

Failed Jint.Tests.Runtime.TemporalRemovedMembersTests.DoesNotExposeTheRemovedMembers(type: "Temporal.ZonedDateTime", removed: "epochSeconds")
  Expected engine.Evaluate($"'{removed}' in {type}.prototype").AsBoolean() to be False, but found True.

Failed Jint.Tests.Runtime.TemporalRemovedMembersTests.PlainDateTimePrototypeExposesExactlyTheMembersTheProposalDefines
  Expected string to be the same string, but they differ at index 342:
  "…,withPlainDate,withPlainTime,year,yearOfWeek"   (actual)
  "…,withPlainTime,year,yearOfWeek"                 (expected)

Failed Jint.Tests.Runtime.TemporalRemovedMembersTests.ZonedDateTimePrototypeExposesExactlyTheMembersTheProposalDefines
  Expected string to be the same string, but they differ at index 92:
  "…ar,epochMicroseconds,epochMilliseconds,epochNanose…"   (actual)
  "…ar,epochMilliseconds,epochNanoseconds,equals,era,e…"   (expected)

Failed!  - Failed: 7, Passed: 1, Total: 8

Verification

Release, freshly built, all green:

Suite Result
dotnet build -c Release 0 errors, 0 compiler warnings
Jint.Tests net10.0 5668 passed, 4 skipped
Jint.Tests net472 5584 passed, 4 skipped
Jint.Tests.PublicInterface net10.0 1486 passed, 9 skipped
Jint.Tests.PublicInterface net472 1485 passed, 9 skipped
Jint.Tests.Test262 99779 passed, 122 skipped, 0 failed

Closes #3010

🤖 Generated with Claude Code

`Temporal.PlainDateTime.prototype.withPlainDate`, and `epochSeconds`,
`epochMicroseconds`, `toPlainYearMonth` and `toPlainMonthDay` on
`Temporal.ZonedDateTime.prototype`, went out with the same June 2024 removals
that took the `Temporal.Now` methods dropped in sebastienros#2996. Neither prototype object
lists them any more
(https://tc39.es/proposal-temporal/#sec-properties-of-the-temporal-plaindatetime-prototype-object,
https://tc39.es/proposal-temporal/#sec-properties-of-the-temporal-zoneddatetime-prototype-object),
and without them both objects match the proposal's property list exactly: 39
names on `PlainDateTime.prototype`, 49 on `ZonedDateTime.prototype`.

Nothing is orphaned this time. `FloorDivide` sits between the two removed
accessors and still serves `epochMilliseconds`, and `ToTemporalDate` plus the
`IsoDate` overloads of `PlainYearMonthConstructor.Construct` and
`PlainMonthDayConstructor.Construct` all keep other callers.

test262 needed no exclusion: all five directories are already gone at the
pinned SHA, and the one place the suite asserts their absence is
`staging/Temporal/removed-methods.js`, which Jint's harness does not generate.
`TemporalRemovedMembersTests` pins both property lists instead.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@lahma
lahma force-pushed the fix/temporal-removed-members branch from 40ebde2 to 46e16cd Compare August 14, 2026 07:59
@lahma
lahma merged commit 30415bb into sebastienros:main Aug 14, 2026
5 checks passed
@lahma
lahma deleted the fix/temporal-removed-members branch August 14, 2026 14:22
lahma added a commit to lahma/jint that referenced this pull request Aug 15, 2026
…lready fixed

comment saying the fix for sebastienros#3010 removes the entry. That fix merged first
(sebastienros#3014, 2026-08-14), sebastienros#3016 merged after it, and nothing went back to delete the
now-stale exclusion - so a test that passes has been skipped ever since.

It asserts the absence of 28 members the Temporal proposal removed, five of
which sebastienros#3014 dropped and the rest of which Jint never had. Both modes pass:

  Passed Temporal("staging/Temporal/removed-methods.js",False)
  Passed Temporal("staging/Temporal/removed-methods.js",True)

Full suite with the entry gone: 102,324 passed, 0 failed.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
lahma added a commit that referenced this pull request Aug 15, 2026
…#3023)

comment saying the fix for #3010 removes the entry. That fix merged first
(#3014, 2026-08-14), #3016 merged after it, and nothing went back to delete the
now-stale exclusion - so a test that passes has been skipped ever since.

It asserts the absence of 28 members the Temporal proposal removed, five of
which #3014 dropped and the rest of which Jint never had. Both modes pass:

  Passed Temporal("staging/Temporal/removed-methods.js",False)
  Passed Temporal("staging/Temporal/removed-methods.js",True)

Full suite with the entry gone: 102,324 passed, 0 failed.

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.

Temporal: five members removed from the proposal are still present

1 participant