Given a set of dates in XML format (see below for sample XML), I need to compute the following information:
- what day of the month it is, e.g. 1st, 2nd, .. , nth, last (this is an easy one)
- the nth weekday of the month it corresponds to, e.g. 1st Monday, 2nd Wednesday, last Friday
- the nth month that it belongs to amongst the months involved in the set of dates, e.g. given dates from August 25 to October 15, September 5th would have n = 2
Here's a sample XML node:
<period date="12/6/2011" day="Tue" month="Dec" year="2011">
Are there any functions in XSLT that would provide this type of info or make this task easier to implement?