Java Date Create date(int year, int month, int day)

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

Description

date

License

Open Source License

Declaration

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

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import java.util.Calendar;

public class Main {
    public static Calendar date(int year, int month, int day) {
        Calendar calendar = Calendar.getInstance();
        calendar.set(Calendar.YEAR, year);
        calendar.set(Calendar.MONTH, month);
        calendar.set(Calendar.DAY_OF_MONTH, day);
        calendar.set(Calendar.HOUR_OF_DAY, 0);
        calendar.set(Calendar.MINUTE, 0);
        calendar.set(Calendar.SECOND, 0);
        calendar.set(Calendar.MILLISECOND, 0);
        return calendar;
    }/* w  w  w. java  2  s. c o m*/
}

Related

  1. date(Date d)
  2. date(final int year, final int month, final int dayOfMonth)
  3. date(int day, int month, int year)
  4. date(int y, int m, int d)
  5. date(int year, int month, int date)
  6. date(int year, int month, int day)
  7. date(int year, int month, int day)
  8. date(int year, int month, int day)
  9. date(int year, int month, int day, int hour, int minute)