How do I add 2 date/times together?
<p>I have to add the current time with another one. </p>

<p>For example, the time now is <code>10:30 on 21st July 2011</code>.</p>

<p>I want to book a vehicle for today at <code>17:00</code>, but <code>10:30 + $minHours &lt; 17:00</code> which means that I cannot make the booking.</p>

<p>Here is my code:</p>

<pre><code>var d = new Date();
var curr_day = d.getDay();
var curr_date = d.getDate();
var hours = d.getHours();
var minutes = d.getMinutes();
var curr_month = d.getMonth();
var curr_year = d.getFullYear();

a = d_names[curr_day] + ', ' 
    + curr_date + ' ' 
    + m_names[curr_month] + ' ' 
    + curr_year;

t1 = document.getElementById('min_hr');

if(a == e.value) 
{
    alert("please call reservation to make a booking for collection in the next 24 hours");
    return false;
} 
else 
{
    return true;
}
</code></pre>
