JavaScript Dates and Times for Pythonistas

Stephen Gruppetta 17 Lessons 2h 16m Updated intermediate js py

Date arithmetic is where a port can be an hour off without an error. Port Python’s start - timedelta(hours=24) as start.subtract({ hours: 24 }), and a patient with a Sunday appointment at 10:00 in New York gets her reminder on Saturday at 11:00, not 10:00, because the clocks go back that night.

In this course, you’ll port a clinic’s morning reminder script, which lists the week’s video sessions, reminders, closures, and booked time for patients and staff in different time zones, to JavaScript.

By the end of this course, you’ll be able to:

  • Read older Date code, and spot where it builds or reads a date differently from Python
  • Choose the right Temporal type, and read UTC timestamps into each patient’s time zone
  • Compare, sort, and do arithmetic on appointments, saying whether you mean a calendar day or 24 hours
  • Add up booked time with Temporal.Duration
  • Format times for each reader with toLocaleString() and Intl.DateTimeFormat
  • Port the whole reminder script to JavaScript

You’ll need Python’s datetime, timedelta, zoneinfo, and strftime(), plus Node 26 and the JavaScript you’ve already used: objects, arrays, Maps, arrow functions, and number formatting with Intl.NumberFormat. The Python examples use Python 3.15.

The course mixes short videos and text lessons with exercises, a project that ports the whole reminder script, and a quiz.

What’s Included:

  • 17 Lessons
  • Video Subtitles and Full Transcripts
  • Translated Subtitles in 8 Languages
  • 2 Downloadable Resources
  • Interactive Quiz to Check Your Progress
  • 5 Hands-On Coding Exercises
  • Q&A With JavaScript Experts: Ask a Question
  • Certificate of Completion

Downloadable Resources:

Related Learning Paths:

About Stephen Gruppetta

Stephen obtained a PhD in physics and worked as a physicist in academia for over a decade before becoming a programming educator. He's constantly looking for simple ways to explain complex things.

» More about Stephen

← Browse All Courses