Here you can find the source of getCurDay(Calendar calendar)
public static int getCurDay(Calendar calendar)
//package com.java2s; //License from project: Open Source License import java.util.Calendar; import java.util.GregorianCalendar; public class Main { public static int getCurDay() { return new GregorianCalendar().get(Calendar.DAY_OF_MONTH); }/*from w w w . j a va 2 s . c o m*/ public static int getCurDay(Calendar calendar) { if (calendar == null) { return getCurDay(); } return calendar.get(Calendar.DAY_OF_MONTH); } }