The code below works well for rounding java calendar time to the nearest 15mins, however how can I change the code below to allow for rounding to the closest 5mins clock mark.
Code:
int unroundedMinutes = isha_jamaat_cal.get(Calendar.MINUTE);
int mod = unroundedMinutes % 15;
System.out.println("#######mod: " + mod);
isha_jamaat_cal.add(Calendar.MINUTE, mod < 8 ? -mod : (15-mod));