Move new ui to ui directory

This commit is contained in:
nemunaire 2022-03-01 13:43:45 +01:00
commit f85758ef33
56 changed files with 0 additions and 0 deletions

View file

@ -0,0 +1,17 @@
<script>
export let date;
export let dateStyle = "long";
export let timeStyle = "long";
function formatDate(input, dateStyle, timeStyle) {
if (typeof input === 'string') {
input = new Date(input);
}
return new Intl.DateTimeFormat(undefined, {
dateStyle,
timeStyle,
}).format(input);
}
</script>
{formatDate(date, dateStyle, timeStyle)}