summaryrefslogtreecommitdiff
path: root/lib/Travel/Status
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2015-06-04 16:44:38 +0200
committerDaniel Friesel <derf@finalrewind.org>2015-06-04 16:44:38 +0200
commit6ddf48b7f40ef7ad601c2fac579dc0a9dbad0bf1 (patch)
treed85ff557a9049852f0993df499962e2319a769c6 /lib/Travel/Status
parent98c8f19f1996ec3ef7b6bdf2f84a7f04e1982248 (diff)
full-route: improve output
Diffstat (limited to 'lib/Travel/Status')
-rw-r--r--lib/Travel/Status/DE/EFA.pm8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/Travel/Status/DE/EFA.pm b/lib/Travel/Status/DE/EFA.pm
index 38a4fa8..06ff1c2 100644
--- a/lib/Travel/Status/DE/EFA.pm
+++ b/lib/Travel/Status/DE/EFA.pm
@@ -162,6 +162,10 @@ sub errstr {
sub sprintf_date {
my ($e) = @_;
+ if ($e->getAttribute('day') == -1) {
+ return undef;
+ }
+
return sprintf( '%02d.%02d.%d',
$e->getAttribute('day'),
$e->getAttribute('month'),
@@ -172,6 +176,10 @@ sub sprintf_date {
sub sprintf_time {
my ($e) = @_;
+ if ($e->getAttribute('minute') == -1) {
+ return undef;
+ }
+
return sprintf( '%02d:%02d',
$e->getAttribute('hour'),
$e->getAttribute('minute'),