Date & Timezone Test Page
Verify dates are stored and displayed correctly
| Su | Mo | Tu | We | Th | Fr | Sa |
|---|---|---|---|---|---|---|
Selected Date (Local)
None
Stored Value (YYYY-MM-DD)
None
Parsed Back (UTC)
None
Display Format
None
April 2, 2000 Birthday
Input: 4/2/2000
Stored: 2000-04-02
Expected: 2000-04-02
Display: April 2nd, 2000
Today's Date
Input: 10/8/2026
Stored: 2026-10-08
Expected: 2026-10-08
Display: October 8th, 2026
Leap Year - Feb 29, 2024
Input: 2/29/2024
Stored: 2024-02-29
Expected: 2024-02-29
Display: February 29th, 2024
New Year's Eve 2024
Input: 12/31/2024
Stored: 2024-12-31
Expected: 2024-12-31
Display: December 31st, 2024
New Year's Day 2025
Input: 1/1/2025
Stored: 2025-01-01
Expected: 2025-01-01
Display: January 1st, 2025
Local Time
Thu Oct 08 2026 21:56:58 GMT+0000 (Coordinated Universal Time)
UTC Time
Thu, 08 Oct 2026 21:56:58 GMT
getTodayString()
2026-10-08
User Selects Date
When you pick "April 2, 2000" in the calendar
formatDateForStorage()
Converts to "2000-04-02" (YYYY-MM-DD format, no time or timezone)
Database Storage
String "2000-04-02" is stored exactly as-is
parseDateFromStorage()
Converts "2000-04-02" back to Date object at midnight UTC
Display
Shows "April 2nd, 2000" - the correct date!
5/5
Tests Passed
✓
All Tests Passing