mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-10-28 06:53:42 +08:00
The multi-argument Date constructor was refused (SC2020), which blocked date-fns and consumer code that builds dates from calendar fields. Typed callers now lower to a seven-f64 runtime call (omitted trailing fields complete with the spec's defaults) and JavaScript callers pass their arguments through ToNumber in order. The runtime mirrors V8: MakeDay bounds the untruncated year and month, years 0-99 map to 1900-1999, fields roll over, and the local time value converts to UTC in the host zone with the same UTC(t) the date parser uses, then TimeClip. Spread arguments stay fenced. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>