Allowing year 1 as unknown year of birth for compatability with date input limits.

This commit is contained in:
2024-12-16 01:28:16 +01:00
parent 19af103bc4
commit 428cdabac1
2 changed files with 4 additions and 4 deletions

View File

@@ -27,11 +27,11 @@
<dfn class="bio-label"><Icon icon="cake" />Date of birth</dfn>
<span class="birthdate">
<span class="birthdate-long">{{ formatDate(actor.dateOfBirth, actor.dateOfBirth.getFullYear() === 0 ? 'MMMM d' : 'MMMM d, yyyy') }}</span>
<span class="birthdate-short">{{ formatDate(actor.dateOfBirth, actor.dateOfBirth.getFullYear() === 0 ? 'MMM d' : 'MMM d, yyyy') }}</span>
<span class="birthdate-long">{{ formatDate(actor.dateOfBirth, actor.dateOfBirth.getFullYear() > 1 ? 'MMMM d, yyyy' : 'MMMM d') }}</span>
<span class="birthdate-short">{{ formatDate(actor.dateOfBirth, actor.dateOfBirth.getFullYear() > 1 ? 'MMM d, yyyy' : 'MMM d') }}</span>
<span
v-if="!actor.dateOfDeath && actor.dateOfBirth.getFullYear() !== 0"
v-if="!actor.dateOfDeath && actor.dateOfBirth.getFullYear() > 1"
class="age"
>{{ actor.ageFromBirth }}</span>
</span>