JavaScript Dates
<!DOCTYPE html> <html> <body> <h2>Creating Date Objects</h2> <script> const now = new Date(); const fromString = new Date("2026-07-15"); const fromParts = new Date(2026, 6, 15, 9, 30, 0); // month 6 = July const fromMillis = new Date(0); // Jan 1, 1970 UTC console.log(now); console.log(fromString); console.log(fromParts); </script> </body> </html>