Hi so because the jquery range slider has no date range ability and because the only date range plugin for jquery UI sliders is very bloated and fails to work on modern ipad / new touch event methods... I'm writing my own today..
Can some one better exmplain to me how to do:
"theCurrentDate (05/12/2012) - anOlderDate (05/12/1990) = difference of how many days is?"
"theCurrentDate (05/12/2012) - 200 = but resulting in date formatted version, not some 9394829398 number"?
03-15-2012, 11:53 PM
Dx = new Date("may 5,2012");
Dy = new Date("may 5,1990");
alert((Dx - Dy) / 86400000);
Thank you so much DaveyErwin!
One last question, is there a way to have the output of "new Date(Dx-(200*86400000))" be in this format, "18/10/2011" vs "Tue Oct 18 2011 00:00:00 GMT-0700 (Pacific Daylight Time)"?
03-16-2012, 03:29 AM
Each part of the date is available as date methods
getDate() returns the day of the month
getMonth() returns one less than the month number
getFullYear() returns the year
dR = new Date(Dx-(200*86400000));
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.