posted 21 years ago
Hi - If you use the long (timeDifference) in the above code like:
Date d = new Date(timeDifference);
then d will be some number of months, days, hours, minutes, seconds, .... since Jan 1, 1970. Ignore the year, and just look at the other fields for the elapsed time.
Alternatively, there is an open source implementation of ISO8601 dates being done on sourceforge (the Joda project). Date arithmetic is reasonably straight forward. You might take a look at that.
HTH, Guy