adeoladev / easydate
A library that can generate an accurate date format from a simple sentence.
Installs: 5
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Language:JavaScript
pkg:composer/adeoladev/easydate
This package is not auto-updated.
Last update: 2026-01-01 20:15:52 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.