Skip to content

Commit

Permalink
Fix ageDate test
Browse files Browse the repository at this point in the history
  • Loading branch information
frozzare committed Mar 14, 2024
1 parent 8ffd434 commit 36a6c0e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,9 @@ describe('personnummer', () => {
day = '' + (parseInt(day) - 60);
}

const ageDate = `${year}-${month}-${day < 10 ? '0' : ''}${day}`;
const ageDate = `${year}-${month}-${
('' + day).length < 2 ? '0' : ''
}${day}`;
const personnummerDate = new Date(ageDate);

availableListFormats.forEach((format) => {
Expand Down

0 comments on commit 36a6c0e

Please sign in to comment.