Java Date Create date(int y, int m, int d)

Here you can find the source of date(int y, int m, int d)

Description

date

License

Open Source License

Declaration

public static Date date(int y, int m, int d) 

Method Source Code


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

import java.util.Calendar;
import java.util.Date;

public class Main {
    public static Date date(int y, int m, int d) {
        Calendar c = Calendar.getInstance();
        c.set(Calendar.YEAR, y + 1900);
        c.set(Calendar.MONTH, m);
        c.set(Calendar.DAY_OF_MONTH, d);
        return c.getTime();
    }/*from ww w  . j  a v  a 2 s .c  o m*/
}

Related

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