Hopefully fixed an issue where formats didn't show

Signed-off-by: Louis Hollingworth <louis@hollingworth.ch>
This commit is contained in:
Louis Hollingworth 2022-10-15 13:37:12 +01:00
parent c180404e15
commit 20f681aa3c
Signed by: lucxjo
GPG key ID: B140F8923EF88DA9
2 changed files with 7 additions and 7 deletions

View file

@ -32,7 +32,7 @@ const crntTime = Date.now();
<span>
to get
<code>
<span v-for="format in props.formats" :key="formats.findIndex(format)">
<span v-for="format in props.formats" :key="Math.floor(Math.random()*1000)">
{{Intl.DateTimeFormat(Intl.Locale, format).format(crntTime) + ' '}}
</span>
</code>

View file

@ -42,37 +42,37 @@ const navLinks = [
day: 'numeric',
month: 'long',
year: 'numeric',
}, {hour: '2-digit', minute: '2-digit'}]} dFormat="f" client:load />
}, {hour: '2-digit', minute: '2-digit'}]} dFormat="f" client:only />
<br />
<TimeFormat formats={[{
weekday: 'long',
day: 'numeric',
month: 'long',
year: 'numeric',
}, { hour: '2-digit', minute: '2-digit', }]} dFormat="F" client:load />
}, { hour: '2-digit', minute: '2-digit', }]} dFormat="F" client:only />
<br />
<TimeFormat formats={[{
hour: '2-digit',
minute: '2-digit',
}]} dFormat="t" client:load />
}]} dFormat="t" client:only />
<br />
<TimeFormat formats={[{
hour: '2-digit',
minute: '2-digit',
second: '2-digit',
}]} dFormat="T" client:load />
}]} dFormat="T" client:only />
<br />
<TimeFormat formats={[{
day: '2-digit',
month: '2-digit',
year: 'numeric',
}]} dFormat="d" client:load />
}]} dFormat="d" client:only />
<br />
<TimeFormat formats={[{
day: 'numeric',
month: 'long',
year: 'numeric',
}]} dFormat="D" client:load />
}]} dFormat="D" client:only />
</p>
</div>
</Layout>