0.0.1 • Published 8 years ago

number-to-date v0.0.1

Weekly downloads
2
License
MIT
Repository
github
Last release
8 years ago

number-to-date

Get a month, a day from a number.

Build Status

npm install --save number-to-date
var numberToDate = require('number-to-date');

// Get a month from a number
numberToDate(1, 'month'); // "January"

// Get a month from a number in French
numberToDate(1, 'month', 'fr'); // "Janvier"

// Get a day from a number
numberToDate(1, 'day'); // "Monday"

// Get a day from a number in French
numberToDate(1, 'day', 'fr'); // "Lundi"

Supported languages:

  • English: en
  • French: fr
  • German: de

Contribution

You can add language by creating a folder the in i18l which will contain two JSONs file.

It uses ISO-639-1 codes.

Don't forget to add the language to the README.md file.