diff options
Diffstat (limited to 'src/components')
| -rw-r--r-- | src/components/BlogItem.astro | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/src/components/BlogItem.astro b/src/components/BlogItem.astro index 08b98c4..7af463e 100644 --- a/src/components/BlogItem.astro +++ b/src/components/BlogItem.astro @@ -5,17 +5,7 @@ function formatDate(date: Date) { const day = date.getDate(); const month = date.toLocaleString("default", { month: "long" }); const year = date.getFullYear(); - - let suffix = "th"; - if (day === 1 || day === 21 || day === 31) { - suffix = "st"; - } else if (day === 2 || day === 22) { - suffix = "nd"; - } else if (day === 3 || day === 23) { - suffix = "rd"; - } - - return `${month} ${day}${suffix} ${year}`; + return `${month} ${day}, ${year}`; } interface Props { |
