Skip to content

Latest commit

 

History

History
33 lines (23 loc) · 514 Bytes

README.md

File metadata and controls

33 lines (23 loc) · 514 Bytes

how-old gives how old from birthdate to any date. Not just previous dates from birthdate.

Examples

Example 1 - One day before birthday

new Date(2019, 1, 2), new Date(2020, 1, 1);
{ years: 0, months: 11, days: 30 }

Example 2 - On birthday

new Date(2019, 1, 2), new Date(2020, 1, 1);
{ years: 0, months: 11, days: 30 }

Example 3 - One day after birthday

new Date(2019, 1, 2), new Date(2020, 1, 1);
{ years: 0, months: 11, days: 30 }