1.0.0 • Published 3 years ago

@narendrayogi/how-old v1.0.0

Weekly downloads
14
License
ISC
Repository
github
Last release
3 years ago

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 }