You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by Foxy Shadis <fo...@hotmail.com> on 2003/02/02 01:35:21 UTC

datetime:month-in-year function

I cannot access the ISO site to check on this, so I thought I would ask 
here. Is the month-in-year function supposed to return values on a 0-11 
scale? For instance, month-in-year('0001-01-01') returns '00', and so on. I 
don't think it should be that way, because both year and day return in a 
1-xxx scale.

The month-name function would break in the case of 
month-name(month-in-year('0001-01-01')) (obviously a rhetorical example, but 
still valid), and return incorrectly for other months. In fact, any use 
requires an addition of one.

I'm not putting this in bugzilla just because I'm not sure if it's a bug. If 
it is, I'll post it.

Foxy

_________________________________________________________________
Help STOP SPAM with the new MSN 8 and get 2 months FREE*  
http://join.msn.com/?page=features/junkmail


Re: datetime:month-in-year function

Posted by Joseph Kesselman <ke...@us.ibm.com>.
ISO website is responding now, though slowly.

The best documentation I've found on month-in-year is
        http://www.exslt.org/date/functions/month-in-year/index.html
... which doesn't explicitly answer the question of whether the number is 
0-based or 1-based. They cite sample implementations in several languages, 
and you could try reverse-engineering those... 

But they seem to have been very careful to leave this unspecified. Time to 
contact the EXSLT team and ask whether this was deliberate?

______________________________________
Joe Kesselman  / IBM Research