Here you can find the source of getDateObj(String argsDate, String split)
public static Date getDateObj(String argsDate, String split)
//package com.java2s; //License from project: Apache License import java.util.Calendar; import java.util.Date; import java.util.GregorianCalendar; public class Main { public static Date getDateObj(int year, int month, int day) { Calendar c = new GregorianCalendar(); c.set(year, month - 1, day);//from w w w.j a v a2 s . co m return c.getTime(); } public static Date getDateObj(String argsDate, String split) { String[] temp = argsDate.split(split); int year = new Integer(temp[0]).intValue(); int month = new Integer(temp[1]).intValue(); int day = new Integer(temp[2]).intValue(); return getDateObj(year, month, day); } public static Date getDateObj() { Calendar c = new GregorianCalendar(); return c.getTime(); } }