From 3c7723c96a79afe4723de7efca18439c41657e1d Mon Sep 17 00:00:00 2001 From: Sebin Nyshkim Date: Sun, 27 Dec 2020 01:10:52 +0100 Subject: [PATCH] feat: :sparkles: change date of birth and include calculated age --- src/mixins/Sebin.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/mixins/Sebin.js b/src/mixins/Sebin.js index 27318c8..f9d4eb6 100644 --- a/src/mixins/Sebin.js +++ b/src/mixins/Sebin.js @@ -4,7 +4,7 @@ export default { firstName: "Sebin", middleName: "Antario", lastName: "Nyshkim", - dateOfBirth: new Date("1988-04-25"), + dateOfBirth: new Date("1993-10-17"), gender: "male ♂️", height: 210, // cm weight: 124, // kg @@ -38,12 +38,14 @@ export default { }, birthdate() { const locale = this.getClientLocale(); - - return this.dateOfBirth.toLocaleDateString(locale, { + const age = this.getAge(this.dateOfBirth); + const dobLocaleString = this.dateOfBirth.toLocaleDateString(locale, { year: "numeric", month: "long", day: "2-digit" }); + + return `${dobLocaleString} (${age})`; }, getSebinData() { const generic = {