Best way to get the difference between two dates in days.
Suppose from Date is "27-04-2018" and To Date is "29-04-2018"
The Date format will be "DD-MM-YYYY"
var dateDiff = getDateDifference("27-04-2018", "29-04-2018", "DD-MM-YYYY");
Output: 2
Common Function:
Using Moment.js you can Parse, validate, manipulate, and display dates and times in JavaScript. Moment.js is freely distributable under the terms of the MIT license.
Moment is available in more than 123 Languages.
You can download Moment.js from Moment's official website https://momentjs.com/
OR
Visit below URL to get CDN for Moment.js
https://www.codebrary.com/2018/03/moment-library-cdn.html
- Home
- _About
- _Contact
- Asp.Net C#
- Blogger
- CDN
- _Bootstrap Library, CSS, Font
- _jQuery Library
- _Moment Library
- JavaScript
- jQuery
- MongoDB
- MSSQL
- Nuget
- Tech
- Tools
- _EXCEL To BSON
- _EXCEL To JSON
- _Get Date Array
- _HTML Entity Encoder & Decoder
- _Image to Base64
- _JSON To HTML Table
- _Keyboard Key Values
- _ObjectId to Timestamp
- _Youtube Video Thumbnail
No comments