Security News
JavaScript Leaders Demand Oracle Release the JavaScript Trademark
In an open letter, JavaScript community leaders urge Oracle to give up the JavaScript trademark, arguing that it has been effectively abandoned through nonuse.
DateDiff is a minimalized javascript date arithmetic extension.
It works perfectly with easy-date
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
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 1,890 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
In an open letter, JavaScript community leaders urge Oracle to give up the JavaScript trademark, arguing that it has been effectively abandoned through nonuse.
Security News
The initial version of the Socket Python SDK is now on PyPI, enabling developers to more easily interact with the Socket REST API in Python projects.
Security News
Floating dependency ranges in npm can introduce instability and security risks into your project by allowing unverified or incompatible versions to be installed automatically, leading to unpredictable behavior and potential conflicts.