diff options
Diffstat (limited to 'lib/Travel/Status/DE/IRIS.pm')
-rw-r--r-- | lib/Travel/Status/DE/IRIS.pm | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/Travel/Status/DE/IRIS.pm b/lib/Travel/Status/DE/IRIS.pm index 6d712de..733a73c 100644 --- a/lib/Travel/Status/DE/IRIS.pm +++ b/lib/Travel/Status/DE/IRIS.pm @@ -144,11 +144,11 @@ sub new { } @{ $self->{results} } = grep { - my $d = ( $_->departure // $_->arrival ); - my $sd = $_->sched_departure // $_->sched_arrival // $d; - $d = $d->subtract_datetime( $self->{datetime} ); - $sd = $sd->subtract_datetime( $self->{datetime} ); - not $d->is_negative and $sd->in_units('minutes') < $self->{lookahead} + my $d = $_->departure // $_->arrival; + my $s = $_->sched_arrival // $_->sched_departure // $_->arrival // $d; + $d = $d->subtract_datetime( $self->{datetime} ); + $s = $s->subtract_datetime( $self->{datetime} ); + not $d->is_negative and $s->in_units('minutes') < $self->{lookahead} } @{ $self->{results} }; @{ $self->{results} } |