title: Java - Subtract Days from date
body: <p>I'm trying to subtract 5 days from a date which comes in as a string initially.</p>
  
  <p>I have had a look at some of the other posts on this subject but the result i get from the code is always incorrect. The main problem is that the year value does not seem to change when the days are subtracted for example - <code>2012-01-01 subtract 5 days gives me 'Jan 27 2012'</code> using this code - </p>
  
  <pre><code>cal.add(Calendar.DATE, -5);
  </code></pre>
  
  <p>Please help.</p>