title: Java: Easiest Way to Subtract Dates
body: <p>I have created a class with two fields that need to be dates, <code>start_date</code> and <code>date_passed</code>. I have been researching the best way in java to have dates in a <code>YYYY MM DD</code> format that allows for easy date subtraction, and the ability to "make-up" a date, say in the future for example.</p>
  
  <p>Example of what I'd like it to do...</p>
  
  <pre><code>library.circulate_book("Chemistry", **start date here**) //actual date or random date
  library.pass_book("Chemistry", **Date Passed here**) //random date such as 5 days after start date
  int days_had = Date_Passed - start_date
  </code></pre>
  
  <p>So far, I've found plenty of ways to format dates using Calendars and Date classes, but have yet to find one that looks like it would work considering most dates end up as Strings. Any suggestions/small examples are greatly appreciated! Also, any links to examples would be awesome!</p>