|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Compare Dates
> From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx > [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx]On Behalf Of Michael Kay > Sent: Tuesday, June 12, 2001 11:55 AM > To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx > Subject: RE: Compare Dates > > > > I want to compare two dates to find out which comes first. > > 2000-12-19 > > What I don´t want to do is to compare each number, if I validate the > > formate is there a XSL function to see which date comes first?????? > > If the dates are in ISO format just strip the hyphens and compare as > numbers: > > xsl:if test="translate($date1, '-', '') < translate($date2, '-', '')" Note however that this won't work properly if the ISO date contains trailing time zone information... XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
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
|

Cart








