Re: [MarkLogic Dev General] Identify a date as weekend

2016-10-14 Thread Geert Josten
For the sake of completeness, there is also xdmp:dayname-from-date, but I like the suggestion from Florent better. Note though: "Dates before October 15, 1582 (the start of the Gregorian calendar) will not return the correct date value." (see http://docs.marklogic.com/fn:format

Re: [MarkLogic Dev General] Identify a date as weekend

2016-10-14 Thread Florent Georges
You can use format-date(): format-date(current-date(), '[F]') = ('saturday', 'sunday') Regards, -- Florent Georges http://fgeorges.org/ http://h2oconsulting.be/ On 14 October 2016 at 09:56, Debin, Infant Jerald (LNG-CON) wrote: > Hi All, > > > > Is there any way to identify particular date fa

Re: [MarkLogic Dev General] Identify a date as weekend

2016-10-14 Thread Jason Hunter
xdmp:strftime("%a", $date) Then look at the string output. Be careful with timezones. -jh- On Oct 14, 2016, at 15:56, Debin, Infant Jerald (LNG-CON) mailto:infantjerald.de...@lexisnexis.com>> wrote: Hi All, Is there any way to identify particular date falls in Saturday or Sunday using xque