title: Java Date getDate() deprecated, refactored to use calendar but looks ugly
body: <p>Eclipse is warning that I'm using a deprecated method:</p>
  
  <pre><code>eventDay = event.getEvent_s_date().getDate();
  </code></pre>
  
  <p>So I rewrote it as</p>
  
  <pre><code>eventDay = DateUtil.toCalendar(event.getEvent_s_date()).get(Calendar.DATE);
  </code></pre>
  
  <p>It seems to work but it looks ugly.  My question is did I refactor this the best way?  If not, how would you refactor?  I need the day number of a date stored in a bean.</p>
  
  <p>I ended up adding a method in my DateUtils to clean it up</p>
  
  <p><code>eventDay = DateUtil.getIntDate(event.getEvent_s_date());</code></p>
  
  <pre><code>public static int getIntDate(Date date) {
      return DateUtil.toCalendar(date).get(Calendar.DATE);
  }
  </code></pre>