summaryrefslogtreecommitdiff
path: root/bin/efa-m
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 /bin/efa-m
parent98c8f19f1996ec3ef7b6bdf2f84a7f04e1982248 (diff)
full-route: improve output
Diffstat (limited to 'bin/efa-m')
-rwxr-xr-xbin/efa-m10
1 files changed, 9 insertions, 1 deletions
diff --git a/bin/efa-m b/bin/efa-m
index 3956bdb..3960c69 100755
--- a/bin/efa-m
+++ b/bin/efa-m
@@ -91,10 +91,18 @@ sub format_route {
say "BUG";
next;
}
- if ( $stop->{arr_time} eq $stop->{dep_time} ) {
+ if ( not defined $stop->{arr_time} ) {
$output .= sprintf( " %5s %40s %s\n",
$stop->{dep_time}, $stop->{stop}, $stop->{platform}, );
}
+ elsif (not defined $stop->{dep_time}) {
+ $output .= sprintf( "%5s %40s %s\n",
+ $stop->{arr_time}, $stop->{stop}, $stop->{platform}, );
+ }
+ elsif ( $stop->{arr_time} eq $stop->{dep_time} ) {
+ $output .= sprintf( " %5s %40s %s\n",
+ $stop->{dep_time}, $stop->{stop}, $stop->{platform}, );
+ }
else {
$output .= sprintf(
"%5s → %5s %40s %s\n",