Sentence Format Date Converter
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.
Installation
Install via npm:
$ npm install date-convert
Or via yarn:
$ yarn add date-convert
Translate the Dates!
The 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 = ; // => '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:
// => 'March twenty fifth, two thousand ten' // => 'July fourth, seventeen seventy six' // => 'August twenty ninth, two thousand fifty six' // => 'January first, two thousand' // => 'March fifteenth, four hundred sixty two'
License
Copyright Lance Turri. Released under the terms of the MIT license.