Get a month, a day from a number.
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
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.