I'm developing an app in Android which have a service that must be executed every Thursday and Sunday at 22:00
What I do need, is to set a Calendar to that day and time. However, I'm not sure about how to do it.
Calendar calendar = Calendar.getInstance();
This is giving me a calendar with the current date and time.
I know I can add days, minutes, hours, etc. But, is there any way to directly setNext("thursday")
?
I don't want to do many maths there. I mean I'm looking for an answer which doesn't need to calculate how many minutes/hours/days are left till next thursday.
Thank you!!