- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
public static Date createDate(Integer iYear, Integer iMonth, Integer iDay) throws Exception
{
if ((!(iYear instanceof Integer))
|| (!(iMonth instanceof Integer))
|| (!(iDay instanceof Integer))
)
{
throw new Exception();
}
Date date = null;
String year, month, day;
year = iYear.toString();
month = iMonth.toString();
day = iDay.toString();
try
{
date = new SimpleDateFormat("yyyy/MM/dd").parse(year + "/" + month + "/" + day);
} catch (ParseException e)
{
log.warn("Date transformation failed for year, month, day: " + iYear + ", " + iMonth + ", " + iDay);
}
return date;
}