-
Notifications
You must be signed in to change notification settings - Fork 64
Document temporal parsing #1392
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| The values of the parameters may be arbitrarily large. | ||
| The values of the parameters may be negative. | ||
| The xref:values-and-types/temporal.adoc#cypher-temporal-accessing-components-durations[components of `DURATION` objects] are individually accessible. | ||
| The `pattern` parameter follows the link:https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/time/format/DateTimeFormatter.html[Java DateTimeFormatter]. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DURATION
does not use the Java DatetimeFormatter but our own system. Could we reference to the the Duration Format characters instead as they follow the same system.
| Selecting a `ZONED DATETIME` or `ZONED TIME` as the `time` component and overwriting the timezone will adjust the local time to keep the same point in time. | ||
| `epochSeconds`/`epochMillis` may be used in conjunction with `nanosecond`. | ||
| `datetime(null)` returns null. | ||
| The `pattern` parameter follows the link:https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/time/format/DateTimeFormatter.html[Java DateTimeFormatter]. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we feel this is sufficient mention of the format or should we be more explicit as we are with the format function?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as in, add a link to the format function table? sure
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some questions on how much we should expose the pattern system.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some mixed feedback
modules/ROOT/pages/deprecations-additions-removals-compatibility.adoc
Outdated
Show resolved
Hide resolved
| The values of the parameters may be arbitrarily large. | ||
| The values of the parameters may be negative. | ||
| The xref:values-and-types/temporal.adoc#cypher-temporal-accessing-components-durations[components of `DURATION` objects] are individually accessible. | ||
| The `pattern` parameter is constructed from xref:functions/temporal/format.adoc#query-functions-temporal-format-duration-types-characters[Allowed characters for duration types]. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if we want to call it 'pattern argument' rather than 'pattern parameter', as in the table above it is referred to as an argument? If you decide to change this, it also applies to other parts of the PR.
A few of the bullet points above mentions parameter, but they seem to be about the values of the map/the numeric parts of the string in the input argument. It is not really part of this PR but I also feel like that use of the world parameter is also a bit confusing for a user, maybe 'component' would be better (that is what we call it in Example 1)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changing to 'argument' to be consistent with the table(s). also accepting 'component' to make this clearer.
thanks for noticing 👍
| If `from` has a time component and `to` does not, the time component of `to` is assumed to be midnight, and vice versa. | ||
| If `from` has a time zone component and `to` does not, the time zone component of `to` is assumed to be the same as that of `from`, and vice versa. | ||
| If `to` has a date component and `from` does not, the date component of `from` is assumed to be the same as that of `to`, and vice versa. | ||
| The `pattern` parameter follows the link:https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/time/format/DateTimeFormatter.html[Java DateTimeFormatter]. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this really be under duration.between() and not in the other bullet point list under duration()?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
copy-paste error i think :) removed it
…ty.adoc Co-authored-by: Louise Berglund <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good now
| PT45S | ||
| P2012Y2M2DT14H37M21.545S | ||
1+d|Rows: 5 | ||
| P5H6M |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| P5H6M | |
| PT5H6M |
Thanks for the documentation updates. The preview documentation has now been torn down - reopening this PR will republish it. |
No description provided.