JSPM

expand-year

1.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 23724
  • Score
    100M100P100Q143164F
  • License MIT

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

Package Exports

  • expand-year

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (expand-year) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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