Here you can find the source of getCalendar(int year, int month, int day)
Parameter | Description |
---|---|
year | The calendar year. |
month | The calendar month (actual month number, not the Java month index). |
day | The calendar day. |
private static Calendar getCalendar(int year, int month, int day)
//package com.java2s; //License from project: Open Source License import java.util.Calendar; public class Main { /**//w w w . java2s. c o m * Create a calendar object for the given parameters. * * @param year The calendar year. * @param month The calendar month (actual month number, not the Java month index). * @param day The calendar day. * @return The calendar object for the given parameters. */ private static Calendar getCalendar(int year, int month, int day) { Calendar calendar = Calendar.getInstance(); calendar.clear(); calendar.set(year, month - 1, day); return calendar; } }