fix: fix birthday parsing
This commit is contained in:
parent
445e3368e2
commit
e9b08b773d
@ -46,7 +46,11 @@
|
||||
|
||||
let created = moment(member.created).format("MMM D, YYYY");
|
||||
let birthday: string;
|
||||
if (member.birthday) birthday = moment(member.birthday).format("MMM D, YYYY");
|
||||
$: {member.birthday;
|
||||
if (member.birthday) birthday = moment(member.birthday, "YYYY-MM-DD").format("MMM D, YYYY");
|
||||
}
|
||||
|
||||
$: trimmedBirthday = birthday && birthday.endsWith(', 0004') ? trimmedBirthday = birthday.replace(', 0004', '') : birthday;
|
||||
|
||||
</script>
|
||||
|
||||
@ -75,7 +79,7 @@
|
||||
{/if}
|
||||
{#if member.birthday}
|
||||
<Col xs={12} lg={4} class="mb-2">
|
||||
<b>Birthday:</b> {birthday}
|
||||
<b>Birthday:</b> {trimmedBirthday}
|
||||
</Col>
|
||||
{/if}
|
||||
{#if member.created}
|
||||
|
Loading…
Reference in New Issue
Block a user