ISO Date

ISO 8601 date format (YYYY-MM-DD)

Pattern

^\d{4}-(?:0[1-9]|1[0-2])-(?:0[1-9]|[12]\d|3[01])$

Matching examples

2024-01-152023-12-31

Non-matching examples

2024-13-0101-15-2024

Breakdown

\d{4}
4-digit year
-(?:0[1-9]|1[0-2])
Month 01-12
-(?:0[1-9]|[12]\d|3[01])$
Day 01-31

Related tools

Other patterns