New: Introducing PHP and Composer Support.Read the Announcement
Socket
Book a DemoInstallSign in
Socket

@risadams/time-since

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@risadams/time-since

A JavaScript function to calculate the elapsed time between a specified value and now.

Source
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

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

Keywords

javascript

FAQs

Package last updated on 09 Apr 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts