The standard YYYY-MM-DD form is parsed as UTC midnight. Formatting that instant in a time zone west of UTC can display the previous calendar day. A date-only business field may need to remain a date string rather than becoming an instant.
Reproduce in an empty temporary directory
This isolated example creates only fixture data in its working directory or runs local JavaScript. Run it separately from your project so the named files cannot overwrite real work.
const assert = require('node:assert/strict');
const instant = new Date('2026-11-10');
console.log(instant.toISOString());
const parts = new Intl.DateTimeFormat('en-US', {
timeZone: 'America/Los_Angeles', year: 'numeric', month: '2-digit', day: '2-digit'
}).formatToParts(instant);
const day = parts.find(p => p.type === 'day').value;
console.log('Los Angeles day:', day);
assert.equal(day, '09');
assert.equal(instant.toISOString(), '2026-11-10T00:00:00.000Z');Observed local output
2026-11-10T00:00:00.000Z
Los Angeles day: 09What to compare
The timestamp remains the same in both lines; the display calendar changes. The fixture explicitly selects Los Angeles so it does not depend on the computer default zone. A UTC serialization is useful evidence for an instant, but it cannot by itself establish the intended birthday, reservation date or reporting date. Those fields may describe a calendar date without a time of day.
Choose the next action
Define the field contract at the API and UI boundary. Preserve a validated date-only value as such when no instant is intended. If you need local midnight in a known environment, construct from numeric year, zero-based month and day with an explicit understanding of the environment zone; do not assume that is a universal representation. For an actual event instant, transmit an offset or UTC timestamp and format using the intended viewer or business zone.
Limits and verification
A date-time string without an offset has different parsing behavior from a date-only string. Nonstandard date text can vary across engines. The fixture checks one standard value and one explicit display zone in Node; it is not a general calendar-input validator. Do not fix an off-by-one display by adding 24 hours, which changes the instant and can break other zones.
Related: JavaScript Sort Puts 10 Before 2: Use a Numeric Comparator and Choose Mutation.
Isolated example executed on macOS on November 10, 2026 (KST), using Bash 3.2, Python 3 for the byte fixture, and Node v26.5.0. Results describe the example, not your application or every runtime version.