Converts date from one language to another
npm install date-word
import dateWord from "date-word";
dateWord(`18. Dezember 2021`, {
is: "de",
to: "en",
});
// 18 december 2021
dateWord(`18 décembre 2021`, {
is: "fr",
to: "es",
});
// 18 diciembre 2021
dateWord(`18 décembre 2021`, {
is: "fr",
format: "isoString",
});
// 2021-12-17T18:30:00.000Z
dateWord(dateInput, options)
Type: string
date to covert from one language to another
Type: object children types : string
language code for the dateInput string
language code for the convert to date
date formats, defaults to none.
formats present as of now
- isoString