a spacetime plugin to reckon a person's age, in any unit, given their birthday.
javascript api:
import spacetime from 'spacetime'
import plugin from 'space-age'
spacetime.extend(plugin)
// set a birthday
let s = spacetime('march 28 1986')
s.age()
// 35
// get your age in months, weeks
s.age('days')
// 12,770
s.age('months')
// 441
command-line api:
npx space-age may 18 1984
npx space-age may 1st 1984 --months
or you can install it locally with npm i -g space-age
MIT