On Tue, 22 Feb 2011 16:00:15 +0100, [UTF-8?]SaaÅ¡ha Metsärantala wrote
> > the first Tuesday in
> > Novemeber or [...]
> > the 3rd Monday in Feb.
It could also be solved in what I think is an ISO 8601 inspired manner as Dnm
where n is 1-7 (Sun to Sat) and m is 1 to 5 (or -5 to -1).
2011-02-D13 would be read as the 3rd Monday in Feb. 2011
2010-11-D31 would be read as the first Tuesday in Nov. 2010.
The default day would be Sun.
2011-03-D1 would be the first Sunday in March.
Since this syntax encodes day there is no reason to expect a - so to count
in the other direction we can use -.
2011-03-D1-1 would be the last Sunday in March.
The default for n in Dn I think we should interpret as last (given that it
is non trivial so
2011-03-D-2 would be the last Monday in March.
> If you are interested in such issues, you could read chapter 4.11 in "XSLT
> cookbook" second edition (dec 2005) where relevant code is provided.
> According to the author, Sal Mangano, such dates are "easy to handle"
> (p. 155). With this book as an inspiration, "last" could be specified with
> an HYPHEN-MINUS (U+0x2D).
Edward C. Zimmermann, NONMONOTONIC LAB