Adding 2 months to an end date in php/javascript
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/2706125/javascript-function-to-add-x-months-to-a-date">Javascript function to add X months to a date</a>  </p>
</blockquote>



<p>another problem I'm dealing with is in JavaScript/PHP. I'd like to add 2 months to a user-input end date. Question is how will I add 2 months to the end date and display it in expiry date? Sorry I'm new to JS.</p>

<pre><code>/**
* Click "Cal" on end date
*/
function getEndDate() {
if(!document.getElementById('startdate').value.length) {
    alert("Start date must be set first.");
}
else {
    prevEndDate = document.getElementById('enddate').value;
    displayCalendar(document.forms[0].enddate,'yyyy/mm/dd',
        document.getElementById('enddatebutton'));
}
}

/**
* Click "Cal" on expiry date
*/
function getExpiryDate() {
if(!document.getElementById('enddate').value.length) {
    alert("End date must be set first.");
}
else {
    prevExpiryDate = document.getElementById('expirydate').value;
    displayCalendar(document.forms[0].expirydate,'yyyy/mm/dd',
        document.getElementById('expirydatebutton'));
 }
}
</code></pre>

<p>Any help is appreciated. Thanks!</p>
