Skip to content
Snippets Groups Projects
Commit 85669167 authored by Torben Böhnke's avatar Torben Böhnke
Browse files

update meldungen.js

parent 0d035178
No related branches found
No related tags found
No related merge requests found
...@@ -21,7 +21,7 @@ const filterAndSortNewsArticlesByDate = (newsArticles, today) => { ...@@ -21,7 +21,7 @@ const filterAndSortNewsArticlesByDate = (newsArticles, today) => {
}) })
.sort((a, b) => { .sort((a, b) => {
const dateA = new Date(a.date), dateB = new Date(b.date); const dateA = new Date(a.date), dateB = new Date(b.date);
return dateB - dateA; // Sort by date return dateA - dateB; // Sort by date ascending: closer dates first
}); });
}; };
......
...@@ -21,7 +21,7 @@ const filterAndSortNewsArticlesByDate = (newsArticles, today) => { ...@@ -21,7 +21,7 @@ const filterAndSortNewsArticlesByDate = (newsArticles, today) => {
}) })
.sort((a, b) => { .sort((a, b) => {
const dateA = new Date(a.date), dateB = new Date(b.date); const dateA = new Date(a.date), dateB = new Date(b.date);
return dateB - dateA; // Sort by date return dateA - dateB; // Sort by date ascending: closer dates first
}); });
}; };
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment