Error in date add
Michael Knümann <[email protected]>
| Newsgroups | gmane.text.xml.xslt.extensions |
|---|---|
| Message-ID | <[email protected]> |
Hi!
I encountered an error using the date:add with an duration like -PT31M
on 2004-11-12T08:30 this results to
2004-11-12T07:0-1
In file date/functions/add/date.add.function.xsl i replaced the
following code:
...
<<xsl:value-of select="*format-number($new-minute mod 60, '00')*" />
<xsl:text>:</xsl:text>
<xsl:if test="*$new-second mod 60 < 10*">0</xsl:if>
<xsl:value-of select="*$new-second mod 60*" />
with
<xsl:value-of select="format-number(($new-minute + 60) mod 60, '00')" />
<xsl:text>:</xsl:text>
<xsl:value-of select="format-number(($new-second + 60) mod 60, '00')" />
....
and now it seems to work properly. Was there a specific reason to
handle seconds different than minutes?
cheers
Michael Knümann