@risadams/time-since

1.0.0 • Public • Published

Time-Since

Given a date, return a data structure that contains the number of years,months, days, hours, minutes, and seconds since that have elapsed since that date.

Install

npm install @risadams/time-since

Examples

const timeSince = require('@risadams/time-since');

let then = new Date(2020, 0, 1);
let elapsed = timeSince(then);

console.table(elapsed);

Contribute

If you think this could be better, please open an issue!

Please note that all interactions in this organization fall under our Code of Conduct.

License

MIT © 1996+ Ris Adams

Package Sidebar

Install

npm i @risadams/time-since

Weekly Downloads

1

Version

1.0.0

License

MIT

Unpacked Size

370 kB

Total Files

5

Last publish

Collaborators

  • risadams