Re: trying to figure out date functions
With 'substring' you can do nice things. I am telling my users to get used to the ISO numbering scheme, but you could very well do a xsl:choose/when converting 01 to Jan in the case of months.
Below you find my method of displaying only the history of changes within ~90 days before the last edit. Note that I add 12 months to the year and 31 days to the month to avoid negative differences in the month and days calculations, and later substract this value (12*30+31=391) again.
<xsl:if test="( ( substring($lastedit,1,4) - substring(date,1,4) ) * 12 + substring($lastedit,6,2) + 12 - substring(date,6,2) ) * 30 + substring($lastedit,9,2) + 31- substring(date,9,2) -391 < 90 ">
-- The information contained in this communication and any attachments is confidential and may be privileged, and is for the sole use of the intended recipient(s). Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please notify the sender immediately by replying to this message and destroy all copies of this message and any attachments. ASML is neither liable for the proper and complete transmission of the information contained in this communication, nor for any delay in its receipt.
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