npm

npm’s 2019 JavaScript ecosystem survey analysis is now available!Get your copy here »

to-age

1.0.0 • Public • Published

to-age

An extremely simple module that converts a date to an age.

$ toAge('1991-04-24'); // 24 (at time of writing)

Installing

npm i to-age --save

Usage

var toAge = require ('to-age');
 
// From an instance
toAge(new Date(1991, 4, 24));
 
// From a string
toAge('1991-04-24');

install

npm i to-age

Downloadsweekly downloads

2

version

1.0.0

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability