Parse a year into its full number value
npm install parse-year> Parse a year into its full number value
```
$ npm install --save parse-year
`js
var parseYear = require('parse-year');
parseYear('2015') // 2015
parseYear('15', true) // 2015
`
Parses the year, returning undefined if the input was invalid.
##### year
Required
Type: string / number
The year input to parse.
##### expand
Type: boolean false
Default:
If true, expand the year from a 1 or 2 digit number into a full year number, e.g. '15' to 2015.
##### now
Type: date new Date()
Default:
The date from which to calculate the full year. Only used when expand is true`.
MIT © Ben Drucker