adeoladev / easydate
A library that can generate an accurate date format from a simple sentence.
2.0.1
2024-11-08 13:53 UTC
This package is not auto-updated.
Last update: 2026-04-09 21:39:31 UTC
README
EasyDate is a library that can generate an accurate date format from a simple sentence.
Installation
JavaScript
npm i @adeoladev/easydate
PHP
composer require adeoladev/easydate
Usage
EDate('10 days ago','dmy','short');
Supported sentences include any amount of days, weeks or months in the future and the past. Such as 3 weeks ago or 10 days from now. You can also use today to get the current date.
Supported formats include any combination of day/month/year such as dmy or mdy. And you can display it in either short or long form.
License
MIT. Copyright (c) 2021 Adeola Boye.