From c95333993e11598c36411bf432e5508d7e6fa1b7 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Wed, 16 Nov 2011 11:05:12 +0100 Subject: Sort results by time until departure ("countdown") --- lib/Travel/Status/DE/VRR.pm | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/Travel/Status') 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; } -- cgit v1.2.3