|
|
|
@ -2534,7 +2534,6 @@ function parseContestRSS(xml) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Sort by start date, filter out past contests, and limit
|
|
|
|
// Sort by start date, filter out past contests, and limit
|
|
|
|
const now = new Date();
|
|
|
|
|
|
|
|
const currentAndFuture = contests.filter(c => new Date(c.end) >= now);
|
|
|
|
const currentAndFuture = contests.filter(c => new Date(c.end) >= now);
|
|
|
|
currentAndFuture.sort((a, b) => new Date(a.start) - new Date(b.start));
|
|
|
|
currentAndFuture.sort((a, b) => new Date(a.start) - new Date(b.start));
|
|
|
|
return currentAndFuture.slice(0, 20);
|
|
|
|
return currentAndFuture.slice(0, 20);
|
|
|
|
|