Here you can find the source of getDate(Calendar c)
public static int getDate(Calendar c)
//package com.java2s; import java.util.Calendar; public class Main { public static int getDate(Calendar c) { if (c != null) { return c.get(Calendar.DATE); } else {/*w w w . j a v a 2 s. com*/ return Calendar.getInstance().get(Calendar.DATE); } } }