space-age

0.1.0 • Public • Published
calculate human age
npm i space-age
by Spencer Kelly

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

Readme

Keywords

none

Package Sidebar

Install

npm i space-age

Weekly Downloads

0

Version

0.1.0

License

MIT

Unpacked Size

4.88 kB

Total Files

5

Last publish

Collaborators

  • spencermountain