Larkspur Physio’s reminder script now runs in JavaScript. For the Thursday run, reminders.js prints the same eight lines as reminders.py, from the week’s header to Callum Reid: 1:20:00 booked, and Dana’s Sunday reminder stays at ten on Saturday morning while New York’s clocks go back.
Along the way, you’ve learned to:
- Read
Datecode with zero-based month numbers, local getters and setters, and date-only strings interpreted as midnight UTC - Choose the Temporal type that says what you know
- Read UTC timestamps with
Temporal.Instant.from()and show them in each person’s zone with.toZonedDateTimeISO() - Order moments with
Temporal.ZonedDateTime.compare()and compare dates with.equals() - Choose calendar days or elapsed hours on purpose across a clock change
- Add up
Durationvalues, balance them with.round(), and show them withIntl.DurationFormat - Format each patient’s time with
.toLocaleString()and a locale you name
Keep and Drop Your Python Habits
Keep what Python’s datetime taught you: store moments as UTC timestamps alongside zone names, convert to a patient’s zone before local calendar arithmetic and display, and say which units you mean. The report’s run clock stays in UTC, as Python’s does. Six habits to drop: