ConstISODateFormatSchema.parse('2025-01-01'); // ✓ Valid ISO date
ISODateFormatSchema.parse('2025-01-01T10:30:00'); // ✓ Valid local datetime
ISODateFormatSchema.parse('2025-01-01T10:30:00Z'); // ✓ Valid UTC datetime
ISODateFormatSchema.parse('2025-01-01T10:30:00+05:30'); // ✓ Valid with offset
ISODateFormatSchema.parse('2025-01-01T10:30:00.123Z'); // ✓ Valid with milliseconds
ISODateFormatSchema.parse('01/01/2025'); // ✗ Throws - not ISO format
ISODateFormatSchema.parse('2025-13-01'); // ✗ Throws - invalid month
ISODateFormatSchema.parse('not-a-date'); // ✗ Throws - invalid format
A Zod schema that validates ISO date strings.
This schema validates ISO 8601 date and datetime strings in various formats. It accepts both date-only formats (YYYY-MM-DD) and full datetime formats with optional timezone information. The schema supports local datetime strings and those with timezone offsets.