diff options
author | Daniel Friesel <derf@finalrewind.org> | 2011-11-16 11:05:12 +0100 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2011-11-16 11:05:12 +0100 |
commit | c95333993e11598c36411bf432e5508d7e6fa1b7 (patch) | |
tree | 3f84145f9e44e69aa2ddd6ffe5c00fd0ac3eae29 /lib/Travel/Status | |
parent | acd3e1adeca83d0409a9707cae6ab643c583b8d0 (diff) |
Sort results by time until departure ("countdown")
Diffstat (limited to 'lib/Travel/Status')
-rw-r--r-- | lib/Travel/Status/DE/VRR.pm | 4 |
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; } |