Dates — Basics, Time Zones, Intl.DateTimeFormat
Create dates, read parts, format for locales, and print other time zones using Intl.DateTimeFormat.
Intro to dates
Goal: Create and format dates safely.
- new Date()
- Reading parts
- Locale formatting
- Other time zones

Create Date values
Create with new Date(), a timestamp, or simple y/m/d parts (month index starts at 0).
// Create Date instances
// Now (current time)
const now = new Date();
// From timestamp (milliseconds since Jan 1, 1970 UTC)
const fromMs = new Date(0);
// From parts: year, monthIndex (0=Jan), day
const xmas = new Date(2025, 11, 25);
console.log("Now:", now.toString());
console.log("Epoch:", fromMs.toUTCString());
console.log("Xmas:", xmas.toDateString());

All lessons in this course
- Template Literals & Common String Operations
- Numbers — Integers vs Floats & Math Essentials
- Dates — Basics, Time Zones, Intl.DateTimeFormat