get-age
Version:
Calculate the age in years for a birth date
28 lines (19 loc) • 802 B
Markdown
# get-age
[](https://travis-ci.org/bsiddiqui/get-age) [](https://codeclimate.com/github/bsiddiqui/get-age) [](http://badge.fury.io/js/get-age) [](https://www.npmjs.com/package/get-age)
get-age calculates the age in years for a given birth date
## Install
``
$ npm install --save get-age
``
## Usage
```js
var getAge = require('get-age')
getAge('1990-01-09')
// => 25
```
## API
#### `getAge(dateString)` -> `number`
##### dateString
*Required* <br>
Type: `date`
The birth date that you'd like to get the age of in iso format `YYYY-MM-DD`