Java tutorial
//package com.java2s; import java.util.Calendar; public class Main { public static Calendar todaysCalendar() { Calendar now = Calendar.getInstance(); return createNewCalendar(now.get(Calendar.YEAR), now.get(Calendar.MONTH) + 1, now.get(Calendar.DAY_OF_MONTH)); } public static Calendar createNewCalendar(int year, int month, int day) { Calendar calendar = Calendar.getInstance(); calendar.clear(); calendar.set(year, month - 1, day); return calendar; } }