@narendrayogi/how-old

1.0.0 • Public • Published

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 }

Package Sidebar

Install

npm i @narendrayogi/how-old

Weekly Downloads

72

Version

1.0.0

License

ISC

Unpacked Size

2.75 kB

Total Files

4

Last publish

Collaborators

  • narendrayogi