Skip to content

Date parser rejects toDateString output and one-digit month strings #313

Description

@pmatos

Summary

Zod v4.4.3 z.coerce.date() exposes Date string inputs that Node accepts but jsse turns into Invalid Date. This accounts for one failure in each mode of the #279 corpus.

Reproduction

new Date(new Date().toDateString()).getTime(); // jsse: NaN; Node: finite timestamp
new Date("5").getTime();                      // jsse: NaN; Node: May 1 2001

The remaining Zod coercion matrix (ISO, UTC, numeric, boolean, null, invalid values) behaves as expected for the test.

Expected

Date string parsing accepts the implementation-produced Date.prototype.toDateString() form and the legacy one-digit month form used by web-compatible engines. Relevant specification surface: Date.parse / the Date constructor string branch; the spec requires round-tripping toString, toUTCString, and toISOString outputs when milliseconds are zero.

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent-readyReady for autonomous Symphonika dispatchenhancementNew feature or requestsym:claimedSymphonika has claimed this issue for an orchestrated run.sym:failedA Symphonika run reached a deterministic failed state.sym:staleA Symphonika claim exists without a live local run.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions