From: Marius Gavrilescu Date: Thu, 13 Feb 2014 22:28:22 +0000 (+0200) Subject: Sort contests by start date X-Git-Url: http://git.ieval.ro/?a=commitdiff_plain;h=bfd8c0c41788b13ea012c5a423605e48f8ee706b;p=gruntmaster-page.git Sort contests by start date --- diff --git a/lib/Gruntmaster/Page/Ct.pm b/lib/Gruntmaster/Page/Ct.pm index b62b975..a21bf77 100644 --- a/lib/Gruntmaster/Page/Ct.pm +++ b/lib/Gruntmaster/Page/Ct.pm @@ -12,7 +12,7 @@ sub _generate{ debug $env => "language is '$lang'"; my (@running, @pending, @finished); - for (contests) { + for (sort {contest_start $a <=> contest_start $b}contests) { my $ct = { id => $_, name => contest_name, start => strftime ('%c', localtime contest_start),