Subject: RE: Re: [xsl] XSLT 2.0/XPath 2.0 Date arithmetic From: cknell@xxxxxxxxxx Date: Wed, 17 May 2006 21:06:07 -0400 |
That's the direction I was going, but I suppose I was getting tangled in the substring()s and concat() that I was using to produce the XPath 2.0 (or is it XSLT 2.0) format for a date. I was staring at the very volumes you mention, but I'll take another crack at it tomorrow when I'm fresh. -- Charles Knell cknell@xxxxxxxxxx - email
-----Original Message----- From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx> Sent: Wed, 17 May 2006 18:33:05 -0400 To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Subject: Re: [xsl] XSLT 2.0/XPath 2.0 Date arithmetic
<xsl:variable name="thisMonday" select="(for $d in (0 to 6) return ($today - ($d * $day)))[format-date(.,'[F]')='Monday']"/>
Cheers, Wendell
Given a parameter, let's call it "today" in the form of this string "20060517", how do I create a variable, let's call it "tMinus1" such that it represents a day earlier than "20060517", that would be "20060516". So long as "$today" isn't the first day of a month, a simple subtraction and followed by a type cast that I don't grasp would do the trick.
What I'm looking for is guidance on date arithmetic.
Thanks.
-- Charles Knell cknell@xxxxxxxxxx - email
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] XSLT 2.0/XPath 2.0 Date a, Andrew Franz | Thread | RE: RE: [xsl] XSLT 2.0/XPath 2.0 Da, cknell |
Re: [xsl] XSLT 2.0/XPath 2.0 Date a, Wendell Piez | Date | Re: [xsl] transforming from xml to , George Cristian Bina |
Month |