title: How do I roll a date forward to a specified day in Javascript?
body: <p>I'm working on a form that needs to automatically calculate the day the form is being submitted in the format ('MMDDYYYY'), and then on the click of one of two links a link, calculate the closest first day of the coming month, and the closest 15th day of the coming month.</p>
  
  <p>I already created a script that pulls in the date and outputs it to a variable in the format I need, but I need help in calculating the roll forward.</p>
  
  <p>Here's an example of the logic I'm thinking I need:</p>
  
  <p>If the current date is 04092013, on a the button press labeled "Coming 1st of Month" a variable value of 05012013 would be calculated. </p>
  
  <p>If the current date is 04092013, on a button press labeled "Coming 15th of Month" a variable value of 04152013 would be calculated.</p>
  
  <p>If the current date is 04162013 or any date up to the end of the current month, on a button press labeled "Coming 15th of Month" a variable value of 05152013 would be calculated.</p>