Here you can find the source of today()
public static Calendar today()
//package com.java2s; //License from project: Apache License import java.util.Calendar; import java.util.GregorianCalendar; public class Main { public static Calendar today() { return date(now()); }/* w w w.j av a 2 s . c om*/ public static Calendar date(int day, int month, int year) { return new GregorianCalendar(year, month - 1, day); } public static Calendar date(Calendar dateTime) { Calendar date = (Calendar) dateTime.clone(); date.set(Calendar.HOUR_OF_DAY, 0); date.set(Calendar.MINUTE, 0); date.set(Calendar.SECOND, 0); date.set(Calendar.MILLISECOND, 0); return date; } public static Calendar now() { return Calendar.getInstance(); } }