From e78caa80c912ee2edf1b4c57ce81a7025ccbfd17 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Sun, 9 Feb 2014 20:38:32 +0100 Subject: result: strip leading - from train_id --- lib/Travel/Status/DE/IRIS/Result.pm | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/Travel') diff --git a/lib/Travel/Status/DE/IRIS/Result.pm b/lib/Travel/Status/DE/IRIS/Result.pm index 951e390..49d544d 100644 --- a/lib/Travel/Status/DE/IRIS/Result.pm +++ b/lib/Travel/Status/DE/IRIS/Result.pm @@ -35,6 +35,8 @@ sub new { my ( $train_id, $start_ts, $stop_no ) = split( /.\K-/, $opt{raw_id} ); + $train_id =~ s{^-}{}; + $ref->{start} = $strp->parse_datetime($start_ts); $ref->{train_id} = $train_id; @@ -42,6 +44,7 @@ sub new { if ( $opt{transfer} ) { my ($transfer) = split( /.\K-/, $opt{transfer} ); + $transfer =~ s{^-}{}; $ref->{transfer} = $transfer; } -- cgit v1.2.3