I am a ruby on rails developer and have a simple question which I am not able to figure out.
location.href = "/home?selected_date="+selecteddate;"&days_ago="+dateDiff(selecteddate , todaysdate);
I have to generate a URL by using the above code, here I have a variable called selecteddate which generates a value and dateDiff(selecteddate , todaysdate); does a difference of the selected date and today's date and gives me a value.
Question: When I execute it my URL looks like this:
/home?selected_date=Sun Sep 01 2013 00:00:00 GMT+0530 (IST)
I am missing the &days_ago= part. Any Idea how parse two parameters in the URL.
Thanks you in advance