From 7c4b001d599da3ba8d83fc8205a4530f5063dd82 Mon Sep 17 00:00:00 2001 From: Joe Carstairs Date: Tue, 16 Jul 2024 14:48:05 +0100 Subject: Corrects and simplifies ordering of feed items in blog and links --- website/src/components/BlogFeed.astro | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'website/src/components/BlogFeed.astro') diff --git a/website/src/components/BlogFeed.astro b/website/src/components/BlogFeed.astro index 3d6352d..f1559b9 100644 --- a/website/src/components/BlogFeed.astro +++ b/website/src/components/BlogFeed.astro @@ -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; } -- cgit v1.2.3