Skip to content

Commit

Permalink
Fix time error in graph properties (#227)
Browse files Browse the repository at this point in the history
  • Loading branch information
anatheka authored Dec 3, 2024
1 parent f83be4e commit 1040dd3
Showing 1 changed file with 14 additions and 10 deletions.
24 changes: 14 additions & 10 deletions src/lib/components/NodeDetail.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -152,16 +152,20 @@
{#if k == 'url'}
<a href={v} target="_blank">{v}</a>
{:else if k == 'creationTime'}
<time datetime={new Date(v * 1000).toISOString()}>
{Intl.DateTimeFormat(navigator.language, {
weekday: 'long',
year: 'numeric',
month: 'long',
hour: 'numeric',
minute: 'numeric',
day: 'numeric'
}).format(v * 1000)}
</time>
{#if !isNaN(v.valueOf())}
<time datetime={new Date(v * 1000).toISOString()}>
{Intl.DateTimeFormat(navigator.language, {
weekday: 'long',
year: 'numeric',
month: 'long',
hour: 'numeric',
minute: 'numeric',
day: 'numeric'
}).format(v * 1000)}
</time>
{:else}
<time>Invalid Date</time>
{/if}
{:else}
{v}
{/if}
Expand Down

0 comments on commit 1040dd3

Please sign in to comment.