You can get the current Date with:
todayDate = new Date();
EDIT: since you need to compare dates without considering the time component, I recommend you see this: How do I compare two dates without a time part?
Despite the "bad shape" of one answer, I really like it:
SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd"); sdf.format(date1).equals(sdf.format(date2));
In your case, you already have:
SimpleDateFormat dateFormatter = new SimpleDateFormat("dd-MM-yyyy");
so I would consider (for simplicity, not performance):
todayDate = dateFormatter.parse(dateFormatter.format(new Date() ));
rolfl
source share