diff options
Diffstat (limited to 'InternetSecure.pm')
-rwxr-xr-x | InternetSecure.pm | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/InternetSecure.pm b/InternetSecure.pm index 964eb9e..360b95b 100755 --- a/InternetSecure.pm +++ b/InternetSecure.pm @@ -79,13 +79,13 @@ sub parse_expdate { my ($y, $m); - if (/^(\d{4})\W(\d{1,2})$/ || # 2004.07 or 2004-7 - /^(\d\d)\W(\d)$/ || # 04/7 - /^(\d\d)[.-](\d\d)$/) { # 04-07 + if (/^(\d{4})\W(\d{1,2})$/ || # YYYY.MM or YYYY-M + /^(\d\d)\W(\d)$/ || # YY/M or YY-M + /^(\d\d)[.-](\d\d)$/) { # YY-MM ($y, $m) = ($1, $2); - } elsif (/^(\d{1,2})\W(\d{4})$/ || # 07-2004 or 7/2004 - /^(\d)\W(\d\d)$/ || # 7/04 - /^(\d\d)\/?(\d\d)$/) { # 07/04 or 0704 + } elsif (/^(\d{1,2})\W(\d{4})$/ || # MM-YYYY or M/YYYY + /^(\d)\W(\d\d)$/ || # M/YY or M-YY + /^(\d\d)\/?(\d\d)$/) { # MM/YY or MMYY ($y, $m) = ($2, $1); } else { croak "Unable to parse expiration date: $str"; |