Java Calendar Create createCalendar(int year, int month, int date)

Here you can find the source of createCalendar(int year, int month, int date)

Description

create Calendar

License

Open Source License

Declaration

public static Calendar createCalendar(int year, int month, int date) 

Method Source Code

//package com.java2s;

import java.util.Calendar;

import java.util.GregorianCalendar;

public class Main {

    public static Calendar createCalendar(int year, int month, int date) {
        GregorianCalendar calendar = new GregorianCalendar();
        calendar.set(year, month - 1, date);
        return calendar;
    }/*from  w  w  w .j av a2 s .c o  m*/

    public static Calendar createCalendar(int year, int month, int date, int hour, int minute) {
        GregorianCalendar calendar = new GregorianCalendar();
        calendar.set(year, month - 1, date, hour, minute);
        return calendar;
    }

    public static Calendar createCalendar(int year, int month, int date, int hour, int minute, int second) {
        GregorianCalendar calendar = new GregorianCalendar();
        calendar.set(year, month - 1, date, hour, minute, second);
        return calendar;
    }
}

Related

  1. createCalendar()
  2. createCalendar(Date date)
  3. createCalendar(final int year, final int month, final int day)
  4. createCalendar(final int year, final int month, final int day, final int hour, final int minute, final int second)
  5. createCalendar(final int year, final int month, final int dayOfMonth, final TimeZone timeZone)
  6. createCalendar(int year, int month, int day)
  7. createCalendar(int year, int month, int day, int hour, int minute, int second, boolean ceiling)
  8. createCalendar(int year, int month, int dayOfMonth, int hourOfDay, int minute, int second)
  9. createCalendar(long timeInMillis)