I am trying to add a given "duration" to the current time. For example,
String runtime = "1h58m"
and I am trying to add this to the current time so that the output looks something like
The runtime of <movie name> is <runtime>.
<Name> will end at <calculatedDate>
where calculated date is the system current time, plust the given runtime.
This is what I currently have, but don't know how to add the runtime to current system time.
public void playMovie(Movie movie){
SimpleDateFormat df = new SimpleDateFormat("MM/dd/Y hh:mmaa");
Date date = new Date();
System.out.println("The runtime of "+name+" is "+runtime);
System.out.println(""+name+" will end at "+df.format(date));