Here is the solution:For Android equivalent.
String startingFrom = "05-15-"+ currentYear;
String endingDate = "09-10-"+ currentYear;
SimpleDateFormat dateFormat = new SimpleDateFormat("MM-dd-yyyy");
Date CurrentDate = new Date();
Date fromConvertedDate = new Date();
Date toConvertedDate = new Date();
try {
fromConvertedDate = dateFormat.parse(startingFrom);
toConvertedDate = dateFormat.parse(endingDate);
} catch (ParseException e) {
e.printStackTrace();
}
if (yearName.equalsIgnoreCase("Senior")) {
if (CurrentDate.after(fromConvertedDate)
&& CurrentDate.before(toConvertedDate)) {
Cursor cursorC = myDbHelper.retrieveAllReminders("Freshman Budget ");
if (cursorC.moveToFirst()) {
ReminderVO reminderVO = new ReminderVO();
String data = cursorC.getString(cursorC
.getColumnIndex("Title"));
String data1 = cursorC.getString(cursorC
.getColumnIndex("Description"));
reminderVO.setEntryDescription(data1);
reminderVO.setEntryTitle(data);
arr2ListItems.add(reminderVO);
listView.setAdapter(new CustomListAdapter(this,
arr2ListItems));
}
cursorC.moveToFirst();
}}