1.0.0 • Published 9 years ago

expand-year v1.0.0

Weekly downloads
19,653
License
MIT
Repository
github
Last release
9 years ago

expand-year Build Status

Expand a short year to a full year (15 -> 2015)

Install

$ npm install --save expand-year

Usage

var expandYear = require('expand-year');

expandYear(15) // 2015

API

expandYear(year, [now]) -> number

year

Required
Type: number

The year to expand. A one or two digit number is expected.

now

Type: date
Default: new Date()

The date object from which to calculate the current year.

License

MIT © Ben Drucker