Skip to content

Commit

Permalink
Add birthday getter for driver license domain
Browse files Browse the repository at this point in the history
  • Loading branch information
stevejkang committed Sep 2, 2021
1 parent 2983a80 commit 43b133a
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/verification/domain/DriverLicense.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,18 @@ export class DriverLicense extends AggregateRoot<DriverLicenseProps> {
return this.props.driverBirthday;
}

get driverBirthdayYear(): string {
return this.driverBirthday.split('-')[0];
}

get driverBirthdayMonth(): string {
return this.driverBirthday.split('-')[1];
}

get driverBirthdayDay(): string {
return this.driverBirthday.split('-')[2];
}

get licenseNumber(): string {
return this.props.licenseNumber;
}
Expand Down

0 comments on commit 43b133a

Please sign in to comment.