title: How to convert java.util.Date objects into Calendar objects?
body: <p>I'm using the <a href="http://ocpsoft.org/prettytime/">PrettyTime</a> java library for a variety of date/time processing in my java app, such as converting MySQL format dates/datetime strings into java dates, or the vice versa.</p>
  
  <p>However, I see that <code>date.getYear(), date.getMonth()</code>, etc, are all deprecated, and it says to use Calendar instead.  But PrettyTime only returns its results as Date objects, and I see no way to convert the Date objects into calendar objects.</p>
  
  <p>In the documentation for <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Calendar.html">Calendar</a>, the only mention I see of <code>Date</code> is the method <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Calendar.html#setTime%28java.util.Date%29">setTime(Date date)</a>, but the method name is ambigious, and the documentation is not clear on what calling this method would actually do. Obviously I can't just do <code>calendar.set( date.getYear(), date.getMonth(), ..)</code> etc, as those methods of <code>Date</code> are deprecated.</p>
  
  <p>So how can I convert a given Date object to Calendar? </p>