summaryrefslogtreecommitdiff
path: root/lib/Travel
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2011-11-16 11:05:12 +0100
committerDaniel Friesel <derf@finalrewind.org>2011-11-16 11:05:12 +0100
commitc95333993e11598c36411bf432e5508d7e6fa1b7 (patch)
tree3f84145f9e44e69aa2ddd6ffe5c00fd0ac3eae29 /lib/Travel
parentacd3e1adeca83d0409a9707cae6ab643c583b8d0 (diff)
Sort results by time until departure ("countdown")
Diffstat (limited to 'lib/Travel')
-rw-r--r--lib/Travel/Status/DE/VRR.pm4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Travel/Status/DE/VRR.pm b/lib/Travel/Status/DE/VRR.pm
index 4f8ff77..f976c1e 100644
--- a/lib/Travel/Status/DE/VRR.pm
+++ b/lib/Travel/Status/DE/VRR.pm
@@ -204,6 +204,10 @@ sub results {
);
}
+ @results = map { $_->[0] }
+ sort { $a->[1] <=> $b->[1] }
+ map { [ $_, $_->countdown ] } @results;
+
return @results;
}