fix(web): bucket by localDateTime (#12612)

fix(web): local date time for buckets
This commit is contained in:
Jason Rasmussen 2024-09-12 15:30:28 -04:00 committed by GitHub
parent 92811190a8
commit 15f9ff1fcb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 41 additions and 26 deletions

View file

@ -219,9 +219,9 @@
<p class="mt-1 truncate font-medium" title={person.name}>{person.name}</p>
{#if person.birthDate}
{@const personBirthDate = DateTime.fromISO(person.birthDate)}
{@const age = Math.floor(DateTime.fromISO(asset.fileCreatedAt).diff(personBirthDate, 'years').years)}
{@const age = Math.floor(DateTime.fromISO(asset.localDateTime).diff(personBirthDate, 'years').years)}
{@const ageInMonths = Math.floor(
DateTime.fromISO(asset.fileCreatedAt).diff(personBirthDate, 'months').months,
DateTime.fromISO(asset.localDateTime).diff(personBirthDate, 'months').months,
)}
{#if age >= 0}
<p