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.
npm install @risadams/time-since
const timeSince = require('@risadams/time-since');
let then = new Date(2020, 0, 1);
let elapsed = timeSince(then);
console.table(elapsed);
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.
MIT © 1996+ Ris Adams