In one of my XPages applications I needed a lot of date manipulation. I came at a point to create a DateUtilts class with, in opinion, very useful Date and Calendar methods.
I have uploaded on it to XSnippets, so everyone can benefit from it.
Is today between 2 dates
SimpleDateFormat sdf = new SimpleDateFormat("dd-MM-yyyy"); String dateStartInString = "31-08-2015"; String dateEndInString = "31-08-2016"; Date dateStart = sdf.parse(dateStartInString); Date dateEnd = sdf.parse(dateEndInString); System.out.println(DateUtils.isTodayInBetween(dateStart, dateEnd));
output = true