This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: Selection based on date comparison
- From: Jeff Beadle <Jbeadle at manh dot com>
- To: xsl-list at lists dot mulberrytech dot com
- Date: Fri, 30 Nov 2001 15:22:49 -0500
- Subject: RE: [xsl] Selection based on date comparison
- Reply-to: xsl-list at lists dot mulberrytech dot com
here's the usage:
<msxsl:script language="JScript" implements-prefix="date"><![CDATA[
function a_is_greater_than_b(a,b){
return ((new Date(a)) > (new Date(b)));
}
]]></msxsl:script>
<xsl:variable name="filter" select="filtervalues/@timeframe" />
<xsl:... select="Ledger_Entry/[@Distribution_Flag != "" and
date:a_is_greater_than_b(@Trade_date,$filter)] />
-Jeff
-----Original Message-----
From: Jeff Beadle [mailto:Jbeadle@manh.com]
Sent: Friday, November 30, 2001 2:24 PM
To: xsl-list@lists.mulberrytech.com
Subject: RE: [xsl] Selection based on date comparison
why not use a parser extension, like msxsl for msxsl. You could construct
javascript date objects and compare them.
-----Original Message-----
From: Dennis Campillo [mailto:dcampillo@msn.com]
Sent: Friday, November 30, 2001 2:15 PM
To: xsl-list@lists.mulberrytech.com
Subject: Re: [xsl] Selection based on date comparison
>But the date format you choose is unsuited for compraision. Use
>something like 20010603.
>If you cant, you will have to use substring().
>
Unfortunately, the date format is beyond my control at the moment, I
understand I will have to use substring() in order to compare the dates.
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list