On Thu, May 28, 2015 at 5:24 PM, Kari Cowan <[email protected]> wrote:
> Hmm, I have 8.02 on my local machine, and it still throws that error so it
> must be more recent than that version.  Either way, we’re using  v.7 in my
> dev/stage environments (where I am seeing an error), and v.6 on production.
> It may be a while I have 8 available to me on our live servers.
>
>
>
> Any other workaround you might suggest?
>

I guess the question is, what is the range of input you might see?

If you always see

    English month, whitespace, month day, comma, whitespace, year

then you can get the values with something like

    fn:analyze-string ('May 28, 2015',
'(\S+)\s+(\d+),\s+(\d+)')//*:group/fn:string()

and go from there (see also
http://stackoverflow.com/questions/28673035/parsing-a-date-string).
Further upscale, there is some older code at

https://github.com/marklogic/commons/blob/master/dates/date-parser.xqy

that looks capable (I haven't experience with it).

/ch
_______________________________________________
General mailing list
[email protected]
Manage your subscription at: 
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to