I have a list of alarms specified by the user like a typical alarm clock app as:
- day-of-week
- hour-of-day
- minute-of-hour
I'm hand-writing a function to go through a list of times specified this way and determine which is the next up-coming alarm compared to current time. I'll use AlarmManager ultimately to scheduling the next upcoming alarm once I determine which alarm is next. I have considered Date, Time, and GregorianCalendar classes because they have before() and after() methods but they are all a pain to construct given my parameters. Is there a better way than writing all the date/time subtraction math myself?