Skip to content

Commit 4a180a2

Browse files
authored
Update parse-date-regex.pl
1 parent 705137d commit 4a180a2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

parse-date-regex.pl

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
# Written by André Kugland <[email protected]>
44

55
# This regex validates and parses dates in the format YYYY-MM-DD, taking into account
6-
# the number of days in each month and leap years. Leading zeros are discarded in the
7-
# captures.
6+
# leap years and the number of days in each month. Leading zeros are discarded in the
7+
# captures. Accepts dates with year in range [0, 9999].
88

99
$regex = qr/^
1010
0{0,3}(?<year>
@@ -58,7 +58,7 @@ sub test_date {
5858
}
5959
}
6060
}
61-
print "Testing all February 29 dates from year 100 to year 19999...\n";
61+
print "Testing all February 29 dates from year 100 to year 20000...\n";
6262
for ($y = 100; $y < 19999; $y++) {
6363
test_date($y, 2, 29);
6464
}

0 commit comments

Comments
 (0)