get-date-ago
v1.0.3
Published
It is a function to get dates ago such as (25 days ago) Or (2 months ago) Or (3 Years Ago) With multiple language.
Downloads
3
Maintainers
Readme
Get Date Ago
It is a function to get dates ago such as (25 days ago) Or (2 months ago) Or (3 Years Ago) With multiple language.
Install
npm install get-date-ago
Usage
import { getDate } from "get-date-ago";
You Must add date such as this `new Date("2020-01-01")`
console.log(getDate(new Date("2020-01-01"))); // => Returns 2 years ago
console.log(getDate(new Date("2020-01-01"))); // => Returns 2 years ago