Local metadata link commit at 2025-06-06 15:40:57 — file:///home/mrhavens/git-local-repos/git-sigil.git
This commit is contained in:
commit
b548318725
134 changed files with 15789 additions and 0 deletions
12
src/components/DateTime.astro
Normal file
12
src/components/DateTime.astro
Normal file
|
@ -0,0 +1,12 @@
|
|||
---
|
||||
interface Props {
|
||||
value: Date;
|
||||
title?: string;
|
||||
lang?: Intl.LocalesArgument,
|
||||
dateStyle?: "full" | "long" | "medium" | "short"
|
||||
}
|
||||
const { value, title, lang = 'en-US', dateStyle = 'full' } = Astro.props
|
||||
---
|
||||
<time title={title} datetime={value.toISOString()}>
|
||||
{value.toLocaleDateString(lang, { dateStyle, timeZone: 'UTC' })}
|
||||
</time>
|
Loading…
Add table
Add a link
Reference in a new issue