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

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

Description

date

License

Apache License

Declaration

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

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.util.Calendar;
import java.util.GregorianCalendar;

public class Main {
    public static Calendar date(int day, int month, int year) {
        return new GregorianCalendar(year, month - 1, day);
    }//from   ww  w  .  j  ava 2 s  . c  o m

    public static Calendar date(Calendar dateTime) {
        Calendar date = (Calendar) dateTime.clone();
        date.set(Calendar.HOUR_OF_DAY, 0);
        date.set(Calendar.MINUTE, 0);
        date.set(Calendar.SECOND, 0);
        date.set(Calendar.MILLISECOND, 0);
        return date;
    }
}

Related

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