diff options
author | Birte Kristina Friesel <derf@finalrewind.org> | 2023-11-18 19:22:47 +0100 |
---|---|---|
committer | Birte Kristina Friesel <derf@finalrewind.org> | 2023-11-18 19:22:47 +0100 |
commit | cfb45724bbc0cfcd2847dc0847d434bdcef0f2e2 (patch) | |
tree | 13e34febb6c1e02cd43f52f4287a3d1d115d51ec /bin/hafas | |
parent | 1b00e8c899793f986639aa56289988223090c697 (diff) |
hafas: distinguish between 1 minute and ≠1 minutes in output
Diffstat (limited to 'bin/hafas')
-rwxr-xr-x | bin/hafas | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -374,8 +374,11 @@ for my $res ( $hafas->connections ) { } elsif ( $sec->type eq 'WALK' ) { printf( - "${output_bold}Walk %dm${output_reset} (approx. %d minutes)", - $sec->distance, $sec->duration->in_units('minutes') ); + "${output_bold}Walk %dm${output_reset} (approx. %d minute%s)", + $sec->distance, + $sec->duration->in_units('minutes'), + $sec->duration->in_units('minutes') == 1 ? q{} : 's' + ); } else { printf("\n???\n"); |