diff --git a/src/Components/ProfileCard.js b/src/Components/ProfileCard.js index 2288a9df..61d860e8 100644 --- a/src/Components/ProfileCard.js +++ b/src/Components/ProfileCard.js @@ -38,8 +38,7 @@ export default function MemberCard(props) { if (member.birthday) { if (member.birthday.startsWith('0004-')) { - var bday = member.birthday.replace('0004-',''); - var bdaymoment = moment(bday, 'MM-DD').format('MMM D'); + var bdaymoment = moment(member.birthday, 'YYYY-MM-DD').format('MMM D'); setBirthday(bdaymoment); } else { var birthdaymoment = moment(member.birthday, 'YYYY-MM-DD').format('MMM D, YYYY'); @@ -93,7 +92,7 @@ export default function MemberCard(props) { { member.avatar_url ? } className="avatar" modal> {close => (
close()}> - +
)}
: diff --git a/src/Components/ProfilePage.js b/src/Components/ProfilePage.js index 1f61d1b6..0670c41e 100644 --- a/src/Components/ProfilePage.js +++ b/src/Components/ProfilePage.js @@ -38,8 +38,7 @@ export default function ProfilePage(props) { if (member.birthday) { if (member.birthday.startsWith('0004-')) { - var bday = member.birthday.replace('0004-',''); - var bdaymoment = moment(bday, 'MM-DD').format('MMM D'); + var bdaymoment = moment(member.birthday, 'YYYY-MM-DD').format('MMM D'); setBirthday(bdaymoment); } else { var birthdaymoment = moment(member.birthday, 'YYYY-MM-DD').format('MMM D, YYYY'); @@ -95,7 +94,7 @@ export default function ProfilePage(props) { { member.avatar_url ? } className="avatar" modal> {close => (
close()}> - +
)}
: