simple-date-diff-utils
v1.0.1
Published
A lightweight utility to calculate the human-readable difference between two dates.
Maintainers
Readme
simple-date-diff-utils
A lightweight, zero-dependency utility to calculate the readable difference between two dates. (In simple text format)
Installation
npm install simple-date-diff-utils
Usage
const getDateDiff = require('simple-date-diff-utils');
const pastDate = '2024-01-01';
const now = new Date();
console.log(getDateDiff(now, pastDate)); // Output: X day(s) ago