i don't want to compare year, months and days...it can affect the performance...is there any api for direct comparison ?
Date date1 = new Date(d1.getYear() d1.getMonth(), d1.getDate());
Date date2 = new Date(d2.getYear(), d2.getMonth(), d2.getDate());
date1.compareTo(date2);