[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Working with xs:date and xs:gYearMonth
>>>>> "Colin" == Colin Paul Adams <colin@xxxxxxxxxxxxxxxxxx> writes: >>>>> "Michael" == Michael Kay <mhk@xxxxxxxxx> writes: Michael> <xsl:variable name="first-of-previous-month" Michael> select="xs:date('0000-01-01') + ($previous-month * Michael> $one-month)" as="xs:date"/> Colin> Well, Saxon 8.0 doesn't allow this (quite right too - there Colin> never was a year zero!). I tried substituting -0001-01-01, Colin> which saxon doesn't complain of, but Colin> date='{first-of-previous-month}'" is coming out as date=''. ah well, two typos involved there. The second one was mine - missed out the $. The first was yours - you had xs: instead of xdt: for a yearMonthDuration. Having corrected that, I end up with first of June rather than 1st of May, so I will go over the logic, but at least you've shown me how to work with dates - thanks. -- Colin Paul Adams Preston Lancashire
|
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
|