Corrects and simplifies ordering of feed items in blog and links

This commit is contained in:
Joe Carstairs
2024-07-16 14:48:05 +01:00
parent c32b100ba0
commit 7c4b001d59
2 changed files with 5 additions and 16 deletions
+2 -2
View File
@@ -27,8 +27,8 @@ function matchesYear(year: number) {
}
function sortByPubDateDescending(post1: CollectionEntry<'blog'>, post2: CollectionEntry<'blog'>) {
const date1 = post1.data.pubDate.getMilliseconds();
const date2 = post2.data.pubDate.getMilliseconds();
const date1 = post1.data.pubDate.getTime();
const date2 = post2.data.pubDate.getTime();
return date2 - date1;
}