diff options
author | João Augusto Costa Branco Marado Torres <torres.dev@disroot.org> | 2025-06-28 18:14:22 -0300 |
---|---|---|
committer | João Augusto Costa Branco Marado Torres <torres.dev@disroot.org> | 2025-06-28 18:14:22 -0300 |
commit | 79fd506d30eef3d113f4a8e3ab9ebd9004f1e8cc (patch) | |
tree | 96ff57c92e897c3cc3331e23043d20f1665c7d0a /src/components/organisms/Date.astro | |
parent | a1eac976b20e39f86d5944fbec68e2a0f8ffb746 (diff) |
feat: index page
Signed-off-by: João Augusto Costa Branco Marado Torres <torres.dev@disroot.org>
Diffstat (limited to 'src/components/organisms/Date.astro')
-rw-r--r-- | src/components/organisms/Date.astro | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/components/organisms/Date.astro b/src/components/organisms/Date.astro new file mode 100644 index 0000000..a8b643d --- /dev/null +++ b/src/components/organisms/Date.astro @@ -0,0 +1,14 @@ +--- +interface Props { + date: Date; + locales: Intl.LocalesArgument; + options: Intl.DateTimeFormatOptions; +} + +const { date, locales, options } = Astro.props; + +const datetime = date.toISOString(); +const format = new Intl.DateTimeFormat(locales, options).format(date); +--- + +<date {datetime}>{format}</date> |