@risadams/time-since
v1.0.0
Published
A JavaScript function to calculate the elapsed time between a specified value and now.
Downloads
67
Maintainers
Readme
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