diff options
| author | Joe Carstairs <jcarstairs@scottlogic.com> | 2024-07-16 14:48:05 +0100 |
|---|---|---|
| committer | Joe Carstairs <jcarstairs@scottlogic.com> | 2024-07-16 14:48:05 +0100 |
| commit | 7c4b001d599da3ba8d83fc8205a4530f5063dd82 (patch) | |
| tree | adc3081574be6471d467344ec08fdc0e2c52c15e /website/src/components/BlogFeed.astro | |
| parent | c32b100ba00d720621336d5439c753f51e408f56 (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.astro | 4 |
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; } |
