Java getDate date-x days
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/212321/anyone-know-a-simple-way-using-java-calendar-to-subtract-x-days-to-a-date">Anyone know a simple way using java calendar to subtract X days to a date?</a>  </p>
</blockquote>



<p>I d like to get a date string from newDate, and from days</p>

<p>so the yesterday day looks like this:</p>

<pre><code>sdate="2011-07-11" 
days=-1

next day
sdate="2011-07-11" 
days=+1


public static String getNewDate(String sdate, int days) {

return "2011-07-10" or "2011-07-12"
</code></pre>

<p>how can i do this?</p>
