
Product
Introducing PHP and Composer Support in Socket
Socket now supports PHP with full Composer and Packagist integration, enabling developers to search packages, generate SBOMs, and protect their PHP dependencies from supply chain threats.
@risadams/time-since
Advanced tools
A JavaScript function to calculate the elapsed time between a specified value and now.
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
FAQs
A robust, type-safe utility for calculating and formatting time differences. Supports multiple formats (relative, absolute, or individual time units) with internationalization support and accurate handling of future dates, leap years, and timezone differe
We found that @risadams/time-since demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

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.

Product
Socket now supports PHP with full Composer and Packagist integration, enabling developers to search packages, generate SBOMs, and protect their PHP dependencies from supply chain threats.

Security News
An AI agent is merging PRs into major OSS projects and cold-emailing maintainers to drum up more work.

Research
/Security News
Chrome extension CL Suite by @CLMasters neutralizes 2FA for Facebook and Meta Business accounts while exfiltrating Business Manager contact and analytics data.