I'm attempting to write a program where I can insert a string such as
5d2h7m (5 days 2 hours 7 minutes)
and it will take
System.currentTimeMillis();
and add the 5 days 2 hours and 7 minutes to get a new value, which I then save. Later when needed I can check the saved time to see if it has passed.
I'm confused on how to convert 5 days 2 hours and 7 minutes into milliseconds.
Is there a generic Java method for this that I'm missing?
Edit: I'm trying to convert the string into milliseconds, not the other way around.