[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Computing Number of Days between Two Dates in XSLT
I just now tried the EXSLT date:difference template (after downloading date.difference.zip from http://www.exslt.org/date/functions/difference/index.html), and it seems to work as you want. I tried this code: <xsl:variable name="date1" select="'2000-02-25'" /> <xsl:variable name="date2" select="'2007-05-26'" /> <xsl:call-template name="date:difference"> <xsl:with-param name="start" select="$date1" /> <xsl:with-param name="end" select="$date2" /> </xsl:call-template> I get the answer -> P2646D I always get the answer in number of days (I tried with different dates). I think, this is what you want. On 2/15/07, Roger L. Cauvin <roger@xxxxxxxxxx> wrote: 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? -- Regards, Mukul Gandhi
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|