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
- CDN
- _jQuery Library
- _Moment Library
- _Bootstrap Library, CSS, Font
- Nuget
- Tools
- _EXCEL To JSON
- _EXCEL To BSON
- _Get Date Array
- _JSON To HTML Table
- _HTML Entity Encoder & Decoder
- _ObjectId to Timestamp
- _Keyboard Key Values
- _Yootube Video Thumbnail
- JavaScript
- jQuery
- Asp.Net C#
- MSSQL
- MongoDB
- Blogger
- Tech
No comments