summaryrefslogtreecommitdiff
path: root/website/src/components/BlogFeed.astro
diff options
context:
space:
mode:
authorJoe Carstairs <jcarstairs@scottlogic.com>2024-07-16 14:48:05 +0100
committerJoe Carstairs <jcarstairs@scottlogic.com>2024-07-16 14:48:05 +0100
commit7c4b001d599da3ba8d83fc8205a4530f5063dd82 (patch)
treeadc3081574be6471d467344ec08fdc0e2c52c15e /website/src/components/BlogFeed.astro
parentc32b100ba00d720621336d5439c753f51e408f56 (diff)
Corrects and simplifies ordering of feed items in blog and links
Diffstat (limited to 'website/src/components/BlogFeed.astro')
-rw-r--r--website/src/components/BlogFeed.astro4
1 files changed, 2 insertions, 2 deletions
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;
}