title: Get date from calendar
body: <p>Hi everyone in my program i receive a date like:
  2015-01-18</p>
  
  <p>It's a calendar object and i need to get the day, month and the year from the object. Right now i do something like:</p>
  
  <pre><code>int day = date.get(Calendar.DAY_OF_MONTH);
  int month = date.get(Calender.MONTH + 1);
  int year = date.get(Calender.Year);
  </code></pre>
  
  <p>The output is:</p>
  
  <pre><code>day = 18
  month = 1
  year = 2015
  </code></pre>
  
  <p>My problem is that i wanna get the month in this case like 01 and not 1 because that value is parsed later on my code and needs to be on that format. Is ugly to append the 0 before that 1 so anyone knoenter code herews a better way to do this? Thanks</p>