number-to-date

0.0.1 • Public • Published

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.

Readme

Keywords

Package Sidebar

Install

npm i number-to-date

Weekly Downloads

0

Version

0.0.1

License

MIT

Last publish

Collaborators

  • cedced19