title: Is Android's Calendar.Day_Of_Month zero based?
body: <p>According to the android documentation, Day_Of_Month is 1-based (ie '1' means the 1st day of the month) (see <a href="https://developer.android.com/reference/java/util/Calendar#DAY_OF_MONTH" rel="nofollow noreferrer">https://developer.android.com/reference/java/util/Calendar#DAY_OF_MONTH</a> ). </p>
  
  <p>However, when I run the below code on both my android devices, I get "2018-01-02" as the result. Am I missing something?</p>
  
  <pre><code>Calendar cal = new GregorianCalendar();
  TimeZone tzone = TimeZone.getTimeZone("GMT");
  cal.setTimeZone(tzone);
  
  cal.set(Calendar.HOUR, 12);
  cal.set(2018, 0, 1);
  
  DateFormat df = new SimpleDateFormat("yyyy-MM-dd");
  String date = df.format(cal.getTime());
  </code></pre>
  
  <p>The reason I am not just assuming the documentation is wrong is I have some evidence that one of my customer's devices is reporting the date as "2018-01-01"</p>