ager
v2.0.5
Published
Age calculations
Downloads
30
Readme
ager
Age calculations
Install
npm install --save ager
Usage
import age from 'ager';
age(new Date(1991, 3, 24)); // 24
age(1991, 4, 24); // 24
age([ 1991, 4, 24 ]); // 24
API
ager(year[, month, day])
year
Type: number
, date
, array
Full year, instance of Date
or array with date.
month
Type: number
Month in the range 1...12
.
day
Type: number
Day in the range 1...31
.
License
MIT