summaryrefslogtreecommitdiff
path: root/bin/hafas-m
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2022-10-28 08:44:26 +0200
committerDaniel Friesel <derf@finalrewind.org>2022-10-28 08:44:26 +0200
commit24a9f8ee75183a411b3a9cf2c72436fb367461e1 (patch)
tree77a3a3ef864aa7b0301bab5226acea2537919499 /bin/hafas-m
parenteef938bb3688a8a64c2853ceb237d28e3bfd861b (diff)
add arr_cancelled / dep_cancelled accessors
Diffstat (limited to 'bin/hafas-m')
-rwxr-xr-xbin/hafas-m8
1 files changed, 5 insertions, 3 deletions
diff --git a/bin/hafas-m b/bin/hafas-m
index f0d7968..13a1d4b 100755
--- a/bin/hafas-m
+++ b/bin/hafas-m
@@ -249,9 +249,11 @@ if ( $opt{journey} ) {
for my $stop ( $result->route ) {
printf(
"%5s %s %5s %5s %1s%1s %s%s\n",
- $stop->{arr} ? $stop->{arr}->strftime('%H:%M') : q{},
- ( $stop->{arr} and $stop->{dep} ) ? '→' : q{ },
- $stop->{dep} ? $stop->{dep}->strftime('%H:%M') : q{},
+ $stop->{arr_cancelled} ? '--:--'
+ : ( $stop->{arr} ? $stop->{arr}->strftime('%H:%M') : q{} ),
+ ( $stop->{arr} and $stop->{dep} ) ? '→' : q{ },
+ $stop->{dep_cancelled} ? '--:--'
+ : ( $stop->{dep} ? $stop->{dep}->strftime('%H:%M') : q{} ),
$stop->{delay} ? sprintf( '(%+d)', $stop->{delay} ) : q{},
display_occupancy( $stop->{load}{FIRST} ),
display_occupancy( $stop->{load}{SECOND} ),