Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 1,000,000+ packages pre-installed, including ager with all npm packages installed. Try it out:

var ager = require("ager")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

ager v2.0.5

Age calculations

ager Build Status

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

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free