[xquery-talk] function to get week number of a date?

Michael Kay mike at saxonica.com
Mon Nov 8 15:42:50 PST 2010


On 08/11/2010 14:45, Jakob Fix wrote:
> Hi, before starting to writing my own function, I was wondering if
> somebody among the readers of this list has already written a function
> to find out the week number of a given date and is willing to share? I
> haven't found anything on xqueryfunctions.com, for example.
>
> thanks,
> Jakob.
> _______________________________________________
> talk at x-query.com
> http://x-query.com/mailman/listinfo/talk
>
EXSLT has a suitable function (starting from a string rather than an 
xs:date) and there are pointers to a number of implementations you could 
crib from:

http://www.exslt.org/date/functions/week-in-year/index.html

Michael Kay
Saxonica


More information about the talk mailing list