The parse-dateTime function will parse dates before the start of the gregorian
calendar, but it won’t really be a gDate. For instance:
xdmp:parse-dateTime('[D1] [MN] [Y001]', '15 OCTOBER 1582') -
xs:dayTimeDuration("P1D")
returns 1582-10-14, but officially there was a jump from oct 4 on the Julian
calendar to oct 15 on the Gregorian calendar.
Cheers,
Geert
From:
<[email protected]<mailto:[email protected]>>
on behalf of John Snelson
<[email protected]<mailto:[email protected]>>
Reply-To: MarkLogic Developer Discussion
<[email protected]<mailto:[email protected]>>
Date: Wednesday, April 12, 2017 at 2:26 AM
To: "[email protected]<mailto:[email protected]>"
<[email protected]<mailto:[email protected]>>
Subject: Re: [MarkLogic Dev General] xdmp:parse-dateTime
That is the start of the Gregorian calendar:
https://en.wikipedia.org/wiki/1582
You can't use Gregorian calendar based functionality to handle dates before
that calendar began. If this is really a requirement, you'll probably know
enough about older calendars to write your own date handling routines.
John
On 11/04/17 18:31, Oleksii Segeda wrote:
Hi everyone,
The docs says that xdmp:parse-dateTime will not return the correct dateTime
value for dates before October 15, 1582. What should I use for dates before
October 15, 1582?
Regards,
Oleksii Segeda
IT Analyst
Information and Technology Solutions
[http://siteresources.worldbank.org/NEWS/Images/spacer.png]
[http://siteresources.worldbank.org/NEWS/Images/WBG_Information_and_Technology_Solutions.png]
_______________________________________________
General mailing list
[email protected]<mailto:[email protected]>
Manage your subscription at:
http://developer.marklogic.com/mailman/listinfo/general
--
John Snelson, Principal Engineer http://twitter.com/jpcs
MarkLogic Corporation http://www.marklogic.com
_______________________________________________
General mailing list
[email protected]
Manage your subscription at:
http://developer.marklogic.com/mailman/listinfo/general