I will save two times from time picker. One is named start
and one is named end
maybe 1.0PM and 2.0PM respectively. I need to check if a user can take lunch or do a certain task in that time span or certain range of time on a differrent and any date.
I am not sure which function to use. This is what I thought of trying:
- Get start and end from time picker and set to a calender then get timeInMillis and save for both. Then get Current System.timeInMillis on a different date and on a calender negate till that day of start and end days saving and get timeInMillis from that calender for both and check if current time falls in their range.
- Use any example from doc. But I'm confused and cant get the right way.