title: Difference between two timestamps in days C++
body: <p>I have timestamps in the format (<strong>Year.Month.Day</strong>) in an XML file.</p>
  
  <p>I need to find out the difference between two timestamps in days.</p>
  
  <p><strong>Sample Timestamps:</strong></p>
  
  <pre><code>&lt;Time Stamp="20181015"&gt;
  
  &lt;Time Stamp="20181012"&gt;
  </code></pre>
  
  <p>How can I find the number of days between the above timestamps?</p>
  
  <p>Number of days = <code>date2 - date1</code>. I am considering all the days (don't need to skip weekends or any other day). Time-zone does not matter as well.</p>
  
  <p><strong>PS:</strong> I understand that I have to parse the timestamp from XML. I am stuck in the logic after parsing value.</p>
  
  <p><strong>Update-1:</strong> <code>std::chrono::year</code> and other such things are part of C++20. But I get a compilation error:</p>
  
  <blockquote>
    <p>namespace "std::chrono" has no member "year"      </p>
  </blockquote>