I have a string that is usually in format "HH:mm:ss", but can also appear as "x days HH:mm:ss". I have to parse it to Date object and I want to calculate what Date will it be after this time from string. How can it be done?
Date now = new Date();
Date delay = new SimpleDateFormatter("HH:mm:ss").parse(myString);
Date after = new Date(now.getTime() + delay.getTime());
But unfortunately it doesn't work. It adds, but very small value as "delay"