title: Calculate end date based on start date and duration
body: <p>I have Jquery date picker to select start date and dropdown to select number of weeks.</p>
  
  <p>I'm using below codes to get the end date result but its not working: </p>
  
  <pre><code>    week_number_id.on('change', function(e) {
      var selectvalue = $(this).val();
      //Display 'loading' status in the target select list
      date_result_id.html('&lt;i class="uk-icon-spinner uk-icon-spin"&gt;&lt;/i&gt;');
      if (selectvalue == '') 
      {
          date_result_id.html(initial_date_result_html);
      } 
      else 
      {
          //Make AJAX request, using the selected value as the GET
          $.ajax({
              url: 'index.php',
              data:'option=com_mycom&amp;task=getmydateHTML&amp;dvalue='+selectvalue,
              success: function(output) {
                  date_result_id.html(output);
                  updateSelect(date_result_id.val());
              },
              error: function (xhr, ajaxOptions, thrownError) {
                  alert(xhr.status +  ' ' + thrownError);
              }
          });
      }
  });
  </code></pre>
  
  <p>and on php code:</p>
  
  <pre><code> public function getmydateHTML() {
       $jinput = JFactory::getApplication()-&gt;input;
       $db = JFactory::getDbo();
       $query = $db-&gt;getQuery(true);         
       $dt = $jinput-&gt;get ('dvalue');
       $choosendate = $jinput-&gt;get ('start_date');       
       $newdate = strtotime("+". $dt . "week", $choosendate);
       echo   date('M d, Y', $newdate);     
      exit; // this will stop Joomla processing, and not output template modules etc.
  }     
  </code></pre>
  
  <p>Result calculating date starting from jan 01, 1970, weeks are increasing correctly but the code can not get the start date </p>