xsl-list
[Top] [All Lists]

[xsl] Computing Number of Days between Two Dates in XSLT 1.0

2007-02-15 09:12:15
I am looking for an XSLT 1.0 template that computes the number of days
between two dates.  I don't want to reinvent the wheel, but I was unable to
find such a template browsing around in Google.  Can anyone post or point me
to one?

I know there is an EXSLT date:difference template that computes the duration
between two dates, but it can include years and months.  It is not a trivial
task converting these components of a duration to the number of days, as I
would have to take into account leap years and the different number of days
in each month.

--
Roger L. Cauvin
r o g e r @ c a u v i n . o r g
http://cauvin.blogspot.com


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>