We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 705137d commit 4a180a2Copy full SHA for 4a180a2
parse-date-regex.pl
@@ -3,8 +3,8 @@
3
# Written by André Kugland <[email protected]>
4
5
# 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.
+# leap years and the number of days in each month. Leading zeros are discarded in the
+# captures. Accepts dates with year in range [0, 9999].
8
9
$regex = qr/^
10
0{0,3}(?<year>
@@ -58,7 +58,7 @@ sub test_date {
58
}
59
60
61
-print "Testing all February 29 dates from year 100 to year 19999...\n";
+print "Testing all February 29 dates from year 100 to year 20000...\n";
62
for ($y = 100; $y < 19999; $y++) {
63
test_date($y, 2, 29);
64
0 commit comments