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

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

Description

create Date

License

Open Source License

Declaration

public static long createDate(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 long createDate(int year, int month, int day) {
        return createDate(year, month, day, 0, 0, 0);
    }//from   w  ww.  j  a  v  a  2 s  .com

    public static long createDate(int year, int month, int day, int hour, int minute, int second) {
        Calendar cal = Calendar.getInstance();
        cal.clear();
        cal.set(year, Calendar.JANUARY + month - 1, day, hour, minute, second);
        return cal.getTimeInMillis();
    }
}

Related

  1. createDate(int year, int month, int date)
  2. createDate(int year, int month, int date)
  3. createDate(int year, int month, int date)
  4. createDate(int year, int month, int day)
  5. createDate(int year, int month, int day)
  6. createDate(int year, int month, int day)
  7. createDate(int year, int month, int day)
  8. createDate(int year, int month, int day)
  9. createDate(int year, int month, int day, int hour, int minute, int second)