xsl-list
[Top] [All Lists]

date:difference function in xsl

2004-05-03 16:52:26
I am using the date:difference function as found in the following web page
to calculate the date difference between two dates.

http://exslt.org/date/functions/difference/index.html

It works just fine in XMLSpy, and also when I generate the HTML using
xalan.exe (version 1.3).

But, when I deploy the code to an engine which uses Xalan for XSL
transformation, the function ignores the month value in the two dates and
treats them as the same month. As a result, I won't get correct result.

When using XMLSpy and Xalan.exe the following are the results

start:2004-01-01 end:2004-04-27 difference:P116D

start:2004-01-03 end:2004-04-27 difference:P114D

When using the engine the following are the results

start:2004-01-01 end:2004-04-27 difference:P26D

start:2004-01-03 end:2004-04-27 difference:P24D

I am pretty sure that the months are being ignored for some reason by the
function.

Any thoughts on this?. TIA.



<Prev in Thread] Current Thread [Next in Thread>
  • date:difference function in xsl, Ravi Chayanam <=