-
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
Changes from 8 commits
3f1ae26
c77f04f
bf9d210
ccaa206
beca803
a7595ad
f20d685
61269d0
8856b01
6cad915
42bcf67
434314d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -16,10 +16,11 @@ See also xref::values-and-types/temporal.adoc[Temporal values] and xref::express | |||||
|
|
||||||
| .Details | ||||||
| |=== | ||||||
| | *Syntax* 3+| `duration(input)` | ||||||
| | *Syntax* 3+| `duration(input[, pattern])` | ||||||
| | *Description* 3+| Creates a `DURATION` value. | ||||||
| .2+| *Arguments* | *Name* | *Type* | *Description* | ||||||
| .3+| *Arguments* | *Name* | *Type* | *Description* | ||||||
| | `input` | `ANY` | A map optionally containing the following keys: 'years', 'months', 'weeks', 'days', 'hours', 'minutes', 'seconds', 'milliseconds', 'microseconds', or 'nanoseconds'. | ||||||
| | `pattern` | `STRING` | A pattern used to parse the input. If a pattern is provided, `input` must be `STRING`. | ||||||
Lojjs marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
| | *Returns* 3+| `DURATION` | ||||||
| |=== | ||||||
|
|
||||||
|
|
@@ -33,6 +34,7 @@ See also xref::values-and-types/temporal.adoc[Temporal values] and xref::express | |||||
| | 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]. | ||||||
|
||||||
|
|
||||||
| |=== | ||||||
|
|
||||||
|
|
@@ -85,7 +87,8 @@ duration("P14DT16H12M"), | |||||
| duration("P5M1.5D"), | ||||||
| duration("P0.75M"), | ||||||
| duration("PT0.75M"), | ||||||
| duration("P2012-02-02T14:37:21.545") | ||||||
| duration("P2012-02-02T14:37:21.545"), | ||||||
| duration("5 hours 6 minutes", "h 'hours' m 'minutes'") | ||||||
| ] AS aDuration | ||||||
| RETURN aDuration | ||||||
| ---- | ||||||
|
|
@@ -101,7 +104,8 @@ RETURN aDuration | |||||
| | P22DT19H51M49.5S | ||||||
| | PT45S | ||||||
| | P2012Y2M2DT14H37M21.545S | ||||||
| 1+d|Rows: 5 | ||||||
| | P5H6M | ||||||
|
||||||
| | P5H6M | |
| | PT5H6M |
Outdated
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
Uh oh!
There was an error while loading. Please reload this page.