summaryrefslogtreecommitdiff
path: root/lib/Travel/Status/DE
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2014-02-09 20:38:32 +0100
committerDaniel Friesel <derf@finalrewind.org>2014-02-09 20:38:32 +0100
commite78caa80c912ee2edf1b4c57ce81a7025ccbfd17 (patch)
tree45132d7874312ed795bc87cecb571f3d379cf08d /lib/Travel/Status/DE
parent7272bae61c46a0877d26a57543041e6b3fc11713 (diff)
result: strip leading - from train_id
Diffstat (limited to 'lib/Travel/Status/DE')
-rw-r--r--lib/Travel/Status/DE/IRIS/Result.pm3
1 files changed, 3 insertions, 0 deletions
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;
}