To get an idea please look at this unfinished code:
The relevant ArangoDB code can be found here:
https://github.com/arangodb/arangodb/blob/devel/lib/Basics/datetime.cpp
Reading the code is your best shot to understand what will work and what does not. Because this does not follow closely any standard.
At some point I wanted to make it ISO conform but it was decided that it is not worth the trouble and we do not want to change what is currently supported.
If you are interested you can help in my freetime effort to finish the PEG grammar in above repository. It might be added to ArangoDB because we use PEGTL in other places by now. This was not the case when I was looking at the problem last time. Therefore an additional library needed to be added in the past resulting in more resistance.
Is this the functionality you are referring to:
Because you still need to provide a formapt.This could be done as a list or as an grammar. I think for ICU one could provide a vector of formats to test / evaluate. A grammar on the other hand will allow for faster match or termination.
How do you think ICU could be used for iso date parsing?
Thanks
Jan
To unsubscribe from this group and all its topics, send an email to aran...@googlegroups.com.
On Mar 31, 2020, at 16:02, Jan Christoph Uhde <j...@uhdejc.com> wrote:The tests in the tao-file are taken from ISO8601 (2004).
`((\+|\-)\d\d)((:)?\d\d)?$` is not correct because the -cake- `:?` is a lie.
It has either to be used everywhere or not at all.
A time shift, often used in the representation of local standard time against UTC, is represented as follows:
4.3.13 Time shift
a) Basic, hours and minutes: [±][hour][min] or [“Z”] EXAMPLE 1 ‘+0500’ or ‘Z’
b) Basic, hours only: [±][hour] or [“Z”] EXAMPLE 2 ‘+05’ or ‘Z’
c) Extended, hours and minutes: [±][hour][“:”][min] or [“Z”] EXAMPLE 3 ‘+05:00’ or ‘Z’
The UTC designator ["Z"] indicates that there is no time shift from UTC of day and is functionally equivalent to the expressions ‘+0000’ and ‘+00:00’. The time shift shall be expressed as positive (i.e. with the leading plus sign [“+”]) if it is ahead of or equal to UTC, and as negative (i.e. with the leading minus sign [“-”]) if it is behind UTC.
To unsubscribe from this group and all its topics, send an email to arangodb+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/arangodb/f43df4a6-6412-4dbc-bee4-b32ed25611bd%40googlegroups.com.