Parents: #163, #164 Depends on: #179, #180
Implement the shared private Date parsing, UTC extraction, and ISO buffer boundary.
Acceptance:
- Export
JSC__JSValue__dateInstanceFromNullTerminatedString,JSC__JSValue__getUTCTimestamp,JSC__JSValue__toISOString, andJSC__JSValue__DateNowISOString. - Parse the complete NUL-terminated byte string using the engine Date parser, create a fresh selected-realm Date cell, and preserve invalid parses as a Date with a NaN internal value.
- Return the Date internal UTC epoch-millisecond value from
getUTCTimestamp; return NaN for non-Date, invalid, or foreign-VM values. - Write exact ECMAScript UTC ISO output (24-byte ordinary years, 27-byte extended years) without a terminator and return the byte count; return -1 without modifying the caller buffer for non-Date/non-finite input.
- Make
DateNowISOStringuse the realm clock and the same 28-byte writer contract. - Document the pinned-source defect: Bun's Zig declaration for
DateNowISOStringis(*JSGlobalObject, f64) JSValue, but its wrapper and C++ implementation use(*JSGlobalObject, *[28]u8) c_int; implement and test the executable wrapper/C++ contract. - Document that the pinned Bun source declares but does not define
getUTCTimestamp; test the coherent UTC internal-time contract rather than claiming a matched C++ body. - Cover epoch, fractional truncation, pre-epoch milliseconds, leap dates, offsets, extended years, invalid input, non-Date values, same-VM sibling realms, foreign VMs, and failure-atomic buffers.
- Refresh Home/Bun inventories and README/API documentation without changing public/extension counts.