In XSLT, I want to convert an XML document to another. There are several dates and times in the old document that are not very easy to use. For instance:
<foo date="20110310" time="002000" duration="001500"/>
Now I extracted all the information and was able to convert them to ISO 8601 dates:
<xsl:variable name="begin" select='concat($begin_date_year, "-", $begin_date_month, "-", $begin_date_day, "T", $begin_time_hour, ":", $begin_time_minutes, ":", $begin_time_seconds)'/> --> $begin = 2011-03-10T00:20:00
And for a while:
<xsl:variable name="duration" select='concat("PT", $dur_hour, ":", $dur_minutes, ":", $dur_seconds)'/> --> $duration = PT00:15:00
How can I add a duration in DateTime to find out the end (in DateTime format)?
I already thought about adding individual components, but this is due to a lot of messing with the modules, for example, if I added 15 minutes to 23:50, and then I had to adjust the day accordingly, etc.
slhck source share