Subject: Re: [xsl] XSLT 2.0/XPath 2.0 Date arithmetic From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx> Date: Wed, 17 May 2006 18:33:05 -0400 |
<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
====================================================================== Wendell Piez mailto:wapiez@xxxxxxxxxxxxxxxx Mulberry Technologies, Inc. http://www.mulberrytech.com 17 West Jefferson Street Direct Phone: 301/315-9635 Suite 207 Phone: 301/315-9631 Rockville, MD 20850 Fax: 301/315-8285 ---------------------------------------------------------------------- Mulberry Technologies: A Consultancy Specializing in SGML and XML ======================================================================
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] XSLT 2.0/XPath 2.0 Date a, Karen McAdams | Thread | RE: [xsl] XSLT 2.0/XPath 2.0 Date a, Michael Kay |
RE: [xsl] XSLT 2.0/XPath 2.0 Date a, Karen McAdams | Date | RE: Re: [xsl] XSLT 2.0/XPath 2.0 Da, cknell |
Month |