feat: ✨ change date of birth and include calculated age
This commit is contained in:
parent
46d7a89126
commit
3c7723c96a
1 changed files with 5 additions and 3 deletions
|
@ -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 = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue