File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed
Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change 11# parse-date-regex
22
33This regex validates and parses dates in the format YYYY-MM-DD, taking into account
4- the number of the day in each month and leap years. Leading zeros are discarded.
4+ the number of days in each month and leap years. Leading zeros are discarded.
55
66By removing the spaces and comments in the regex, it can be used in Javascript or any
77other language that supports PCRE (Perl-compatible regular expressions), * e.g.* :
Original file line number Diff line number Diff line change 33# Written by André Kugland <kugland@gmail.com>
44
55# This regex validates and parses dates in the format YYYY-MM-DD, taking into account
6- # the number of the day in each month and leap years. Leading zeros are discarded.
6+ # the number of days in each month and leap years. Leading zeros are discarded.
77
88$regex = qr / ^
99 0{0,3}(?<year>
You can’t perform that action at this time.
0 commit comments