Security News
JSR Working Group Kicks Off with Ambitious Roadmap and Plans for Open Governance
At its inaugural meeting, the JSR Working Group outlined plans for an open governance model and a roadmap to enhance JavaScript package management.
DateDiff is a minimalized javascript date arithmetic extension
Node.js npm install date-diff
Bower bower install date-diff
Node.js
var DateDiff = require('date-diff');
In Browser
<script src="date-diff.js"></script>
Quickstart usage:
var date1 = new Date(2015, 11, 1); // 2015-12-1
var date2 = new Date(2014, 0, 1); // 2014-01-1
var diff = new DateDiff(date1, date2);
diff.years(); // ===> 1.9
diff.months(); // ===> 23
diff.days(); // ===> 699
diff.weeks(); // ===> 99.9
diff.hours(); // ===> 16776
diff.minutes(); // ===> 1006560
diff.seconds(); // ===> 60393600
it also add a date helper:
Date.diff(date1, date2).years();
Date.diff(date1, date2).months();
Copyright (c) 2015 Melvin Sembrano. See LICENSE for further details
FAQs
DateDiff is a minimalized Javascript date arithmetic extension.
The npm package date-diff receives a total of 2,462 weekly downloads. As such, date-diff popularity was classified as popular.
We found that date-diff demonstrated a not healthy version release cadence and project activity because the last version was released 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.
Security News
At its inaugural meeting, the JSR Working Group outlined plans for an open governance model and a roadmap to enhance JavaScript package management.
Security News
Research
An advanced npm supply chain attack is leveraging Ethereum smart contracts for decentralized, persistent malware control, evading traditional defenses.
Security News
Research
Attackers are impersonating Sindre Sorhus on npm with a fake 'chalk-node' package containing a malicious backdoor to compromise developers' projects.