I have a unique issue where I have to determine 2 things.
1) if my current time and a custom time are within the same 30 min time slot ( say its 2:10pm and the custom time is 2:22pm , I want to see they are within the same time slot from 2 to 2:30 ) but shouldn't be in the same time slot if current time is 1:55pm and custom time is 2:15pm (30 min difference but not within the same device/clock time slot as one is 1:30 to 2pm and another is 2 to 2:30pm)
2) Now, within the same time slot of 30 mins, if current time is before the custom time, I want to return a true, else return a false. any way to calculate this? I am looking to add a custom function in my common utils class where I can feed it custom time and current time and see the result, so would be useful to have something generic. Any ideas?
I have looked at : Check if a given time lies between two times regardless of date and other articles but nothing describes the 30 min device/clock time slot period.
Any idea if https://commons.apache.org/proper/commons-lang/apidocs/org/apache/commons/lang3/time/DateUtils.html will somehow help me manipulate this exact logic or any custom function/library in android helps with this. will be really helpful!