From 6ddf48b7f40ef7ad601c2fac579dc0a9dbad0bf1 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Thu, 4 Jun 2015 16:44:38 +0200 Subject: full-route: improve output --- lib/Travel/Status/DE/EFA.pm | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'lib') 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'), -- cgit v1.2.3