summaryrefslogtreecommitdiff
path: root/src/components/FormattedDate.astro
diff options
context:
space:
mode:
authorDawid Rycerz <dawid@rycerz.xyz>2026-01-13 18:42:05 +0100
committerDawid Rycerz <dawid@rycerz.xyz>2026-01-13 18:42:05 +0100
commita1d3fb8df0e00faa3920d7f5085a52002e58574e (patch)
tree288c0a6003e7069338035a0a0e3864414b3e071b /src/components/FormattedDate.astro
parent9fe4480c3981c38ae8e24d0495df957039864a5d (diff)
Add polish language support
Diffstat (limited to 'src/components/FormattedDate.astro')
-rw-r--r--src/components/FormattedDate.astro5
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();
---