This library is meant for applications to take dates in a standard format (string or Date object) and convert them into a human readable, sentence format.
Install via npm:
$ npm install date-convertOr via yarn:
$ yarn add date-convertThe main function in this library will take any string date or Date object and convert it to a sentence. This is an example of how to use it:
const convertDate = require('date-convert');
convertDate('2015-03-25'); // => 'March twenty fifth, two thousand fifteen'Any format that can be read by the Date constructor will be able to be converted. Here are some common formats:
convertDate('2010-03-25'); // => 'March twenty fifth, two thousand ten'
convertDate('07/04/1776'); // => 'July fourth, seventeen seventy six'
convertDate('August 29 2456'); // => 'August twenty ninth, two thousand four hundred fifty six'
convertDate('01/01/2000'); // => 'January first, two thousand'
convertDate('Tuesday March 15, 462'); // => 'March fifteenth, four hundred sixty two'Copyright Lance Turri. Released under the terms of the MIT license.
