Java Calendar Create createCalendar(final int year, final int month, final int day)

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

Description

create Calendar

License

Open Source License

Declaration

public static Calendar createCalendar(final int year, final int month, final int day) 

Method Source Code


//package com.java2s;

import java.util.Calendar;

public class Main {
    public static Calendar createCalendar(final int year, final int month, final int day) {
        final Calendar dateTime = Calendar.getInstance();
        dateTime.clear();//from  w  w  w. j  a  v a 2  s  .  c om
        dateTime.set(Calendar.YEAR, year);
        dateTime.set(Calendar.MONTH, month);
        dateTime.set(Calendar.DAY_OF_MONTH, day);
        return dateTime;
    }
}

Related

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