I am having two dated in dd/mm/yyyy format. How to calculate the number of days between these two dates in javascript/jquery.
Example: Fom date is 20/06/2000, to date is 16/08/2011
Simple code
var Date1 = new Date (2008, 7, 25);
var Date2 = new Date (2009, 0, 12);
var Days = Math.round((Date2.getTime() - Date1.getTime())/(1000*60*60*24));
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With