A full timestamp and a calendar date carry different meanings. Dana’s appointment
has a UTC marker, Z, so it names one moment on either laptop. In Python, read it
as an aware datetime; in JavaScript, pass the full timestamp to Date.
The JavaScript timestamp example from the video is:
const text = "2026-11-01T15:00:00Z";
const start = new Date(text);
console.log(start.toISOString());
It prints the same moment in either machine zone:
2026-11-01T15:00:00.000Z
A bare string such as "2026-11-03" becomes midnight UTC when read by Date.
In New York, that moment is Monday evening, so .toDateString() gives
Mon Nov 02 2026. The clinic’s Date check rebooks Jonas instead of Fiona.
Python’s date keeps the closure as a calendar day, and its explicit London
conversion keeps the clinic’s rule independent of the laptop.
Date has no date-only type. Keep calendar-day rules separate from moments;
a later section uses Temporal.PlainDate for that job. For an unreadable parse,
check Number.isNaN(parsed.getTime()): Invalid Date has a NaN time value.
Subtracting Dates gives milliseconds, not a Python timedelta with a .days
attribute.
Next up: Exercise: Check the Holiday Closures. Check the office manager’s closure entries for the clinic.