Support full German date
authorJoey Schulze <joey@infodrom.org>
Mon, 11 Jul 2016 20:33:58 +0000 (22:33 +0200)
committerJoey Schulze <joey@infodrom.org>
Mon, 11 Jul 2016 20:33:58 +0000 (22:33 +0200)
src/InfoCon/buch/infocon

index 08e7f4f..21e5fe7 100755 (executable)
@@ -100,6 +100,12 @@ sub valid_isodate
        } else {
            $date = sprintf('%04d-%02d-%02d', $year+1900, $2, $1);
        }
+    } elsif ($date =~ /^(\d+)\.(\d+)\.(\d+)?$/) {
+       if (length $3 == 2) {
+           $date = sprintf('20%02d-%02d-%02d', $3, $2, $1);
+       } else {
+           $date = sprintf('%04d-%02d-%02d', $3, $2, $1);
+       }
     } elsif ($date !~ /^(\d+)-(\d+)-(\d+)$/) {
        return undef;
     }