get date from week number

Issues related to W3C XQuery.
SteffenWeitsch
Posts: 6

get date from week number

Tue Feb 19, 2019 12:44 pm

Hello,

is there any possibility to get first and last day of a week number in XQuery ?
As input I have date formatted CCYYWW and want to get CCYYMMDD - CCYYMMDD

I also thought about option to implement java calendar but I failed in using java.
Calendar cal = Calendar.getInstance();
cal.set(Calendar.WEEK_OF_YEAR, 23);
cal.set(Calendar.DAY_OF_WEEK, Calendar.MONDAY);

So if there is no XQuery function how can I use java calendar ?

Thanks for help.

Steffen
Last edited by SteffenWeitsch on Tue Feb 19, 2019 6:03 pm, edited 1 time in total.
Radu
Posts: 6044

Re: gate date from week number

Tue Feb 19, 2019 2:36 pm

Hi Steffen,

We (the Oxygen team) do not work much internally with XQuery.
There seems to be quite a large collection of XQuery functions here:

http://www.xqueryfunctions.com/

You can also try to call Java methods directly in XQuery:

http://saxonica.com/html/documentation/extensibility/functions/staticmethods.html

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com

Return to “XQuery”

Who is online

Users browsing this forum: No registered users and 0 guests