diff options
Diffstat (limited to 'src/components/FormattedDate.astro')
| -rw-r--r-- | src/components/FormattedDate.astro | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/components/FormattedDate.astro b/src/components/FormattedDate.astro index 45de273..0c7b2d7 100644 --- a/src/components/FormattedDate.astro +++ b/src/components/FormattedDate.astro @@ -5,11 +5,12 @@ import { getFormattedDate } from "@/utils/date"; type Props = HTMLAttributes<"time"> & { date: Date; dateTimeOptions?: Intl.DateTimeFormatOptions; + locale?: string | undefined; }; -const { date, dateTimeOptions, ...attrs } = Astro.props; +const { date, dateTimeOptions, locale, ...attrs } = Astro.props; -const postDate = getFormattedDate(date, dateTimeOptions); +const postDate = getFormattedDate(date, dateTimeOptions, locale); const ISO = date.toISOString(); --- |
