title: How to calculate the number of the week from the start and end date period?
body: <p>the main idea is to get the number of the week between two dates (from a period of start date and end date)! 
  Something like that: if the period is 01-05-2020 to 31-05-2020 and in the data picker I chouse 08-05-2020 result will be 2, the second week. </p>
  
  <p>can someone help with that can't figure out by my self, 
  thank you!</p>
  
  <p>here is JS date picker code line with setting up period 01-05-2020 to 31-05-2020, how to echo out from this js code number of week for future php usage or input value?</p>
  
  <p>js</p>
  
  <pre><code>&lt;!-- js --&gt;
  &lt;script src='https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.1/jquery.min.js' type='text/javascript'&gt;&lt;/script&gt;
  &lt;!-- Datepicker --&gt;
  &lt;link href='https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.9.0/css/bootstrap-datepicker.min.css' rel='stylesheet' type='text/css'&gt;
  &lt;script src='https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.9.0/js/bootstrap-datepicker.min.js' type='text/javascript'&gt;&lt;/script&gt;
  
  
  &lt;script type="text/javascript"&gt;
  $(document).ready(function(){
  
    $('#datepicker').datepicker({
      format: "dd/mm/yyyy",
      startDate: new Date('2020-5-1'),
      endDate: new Date('2020-5-31')
    });
  
  });
  &lt;/script&gt;
  </code></pre>
  
  <p>html</p>
  
  <pre><code>&lt;div class="form-group"&gt;
  &lt;label for="formGroupExampleInput"&gt;Date of sale&lt;/label&gt;
  &lt;input type="text" name="dos" value="&lt;?php echo $doc; ?&gt;" class="form-control" id='datepicker' id="formGroupExampleInput"&gt;
  &lt;/div&gt;
  </code></pre>