vod jam and earl vod.atverkackt.de
4
fork

Configure Feed

Select the types of activity you want to include in your feed.

Trying to get dates to render properly

+8 -5
+3 -3
src/lib/game/CollectionOverlay.svelte
··· 18 18 const daySet = new Map<string, string>(); 19 19 for (const p of collectedPresents) { 20 20 const d = new Date(p.createdAt); 21 - const key = d.toISOString().slice(0, 10); 22 - const label = d.toLocaleDateString('en-US', { weekday: 'short', month: 'short', day: 'numeric' }); 21 + const key = d.toLocaleDateString('en-CA', { timeZone: 'America/Los_Angeles' }); 22 + const label = d.toLocaleDateString('en-US', { weekday: 'short', month: 'short', day: 'numeric', timeZone: 'America/Los_Angeles' }); 23 23 if (!daySet.has(key)) daySet.set(key, label); 24 24 } 25 25 return [...daySet.entries()].sort((a, b) => a[0].localeCompare(b[0])); ··· 29 29 let filteredPresents = $derived.by(() => { 30 30 let list = [...collectedPresents]; 31 31 if (activeDay) { 32 - list = list.filter((p) => new Date(p.createdAt).toISOString().slice(0, 10) === activeDay); 32 + list = list.filter((p) => new Date(p.createdAt).toLocaleDateString('en-CA', { timeZone: 'America/Los_Angeles' }) === activeDay); 33 33 } 34 34 list.sort((a, b) => { 35 35 const dayA = a.createdAt.slice(0, 10);
+3 -1
src/lib/game/GameHUD.svelte
··· 69 69 {#if props.nearbyPresent} 70 70 <div class="interact-hint"> 71 71 <span class="interact-title">{truncate(props.nearbyPresent.title, 48)}</span> 72 - {#if props.nearbyPresent.creatorHandle} 72 + {#if props.nearbyPresent.speakerHandle} 73 + <span class="interact-creator">@{props.nearbyPresent.speakerHandle}</span> 74 + {:else if props.nearbyPresent.creatorHandle} 73 75 <span class="interact-creator">@{props.nearbyPresent.creatorHandle}</span> 74 76 {/if} 75 77 <span class="interact-action">{isTouchDevice ? 'Tap to open' : 'Press ENTER to open'}</span>
+2 -1
src/lib/game/PresentDetail.svelte
··· 66 66 return new Date(iso).toLocaleDateString('en-US', { 67 67 month: 'short', 68 68 day: 'numeric', 69 - year: 'numeric' 69 + year: 'numeric', 70 + timeZone: 'America/Los_Angeles' 70 71 }); 71 72 } 72 73