n-times-ago

1.0.0 • Public • Published

n-times-ago-npm-package

what is this?

It calculates the date difference between the current date and the previous one.

Installation

npm install --save n-times-ago

Then... ...

const timeDifference = require("n-times-ago"); console.log(timeDifference(date));

Examples

console.log(timeDifference("2022/11/03 02:05:30 pm")); let say the difference between the date 2022/11/03 02:05:30 pm and now is 2 minutes The out put will be => 2 minutes ago

console.log(timeDifference("2022/10/03 02:05:30 pm")); let say the date is 2022/11/03 05:10:30 pm The out put will be => 1 months ago

Package Sidebar

Install

npm i n-times-ago

Weekly Downloads

5

Version

1.0.0

License

ISC

Unpacked Size

2.46 kB

Total Files

3

Last publish

Collaborators

  • bahiru