Age calculations
npm install --save ager
import age from 'ager';
age(new Date(1991, 3, 24)); // 24
age(1991, 4, 24); // 24
age([ 1991, 4, 24 ]); // 24
Type: number
, date
, array
Full year, instance of Date
or array with date.
Type: number
Month in the range 1...12
.
Type: number
Day in the range 1...31
.
MIT