summaryrefslogtreecommitdiff
path: root/lib/Travel/Status/DE/IRIS.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Travel/Status/DE/IRIS.pm')
-rw-r--r--lib/Travel/Status/DE/IRIS.pm4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Travel/Status/DE/IRIS.pm b/lib/Travel/Status/DE/IRIS.pm
index e6bccaf..02299fe 100644
--- a/lib/Travel/Status/DE/IRIS.pm
+++ b/lib/Travel/Status/DE/IRIS.pm
@@ -58,6 +58,10 @@ sub new {
$self->get_realtime;
@{ $self->{results} }
+ = grep { ( $_->departure // $_->arrival ) >= $self->{datetime} }
+ @{ $self->{results} };
+
+ @{ $self->{results} }
= sort { $a->{datetime} <=> $b->{datetime} } @{ $self->{results} };
return $self;