You should be able to use the oneHourBack
Date
value as the value for the lastdate
JDateChooser
, as not only has the time been rolled back, but so has the date value, for example...
Calendar cal = Calendar.getInstance();
cal.set(Calendar.HOUR_OF_DAY, 0);
cal.set(Calendar.MINUTE, 44);
cal.set(Calendar.SECOND, 36);
Date startTime = cal.getTime();
cal.add(Calendar.HOUR, -1);
Date endTime = cal.getTime();
System.out.println("startTime = " + startTime);
System.out.println("endTime = " + endTime);
Outputs...
startTime = Thu Feb 06 00:44:36 EST 2014
endTime = Wed Feb 05 23:44:36 EST 2014
This is the nice thing about Calendar