You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| `input` | `ANY` | A map optionally containing the following keys: 'years', 'months', 'weeks', 'days', 'hours', 'minutes', 'seconds', 'milliseconds', 'microseconds', or 'nanoseconds'.
22
+
| `input` | `ANY` | Either a string representation of a duration value or a map optionally containing the following keys: 'years', 'months', 'weeks', 'days', 'hours', 'minutes', 'seconds', 'milliseconds', 'microseconds', or 'nanoseconds'.
23
23
| `pattern` | `STRING` | A pattern used to parse the input. If a pattern is provided, `input` must be `STRING`.
24
24
| *Returns* 3+| `DURATION`
25
25
|===
26
26
27
27
.Considerations
28
28
|===
29
29
30
-
| At least one parameter must be provided (`duration()` and `+duration({})+` are invalid).
31
-
| There is no constraint on how many of the parameters are provided.
30
+
| If `input` is not a string, at least one component must be provided (`duration()` and `+duration({})+` are invalid).
31
+
| There is no constraint on how many components are provided.
32
32
| It is possible to have a `DURATION` where the amount of a smaller unit (e.g. `seconds`) exceeds the threshold of a larger unit (e.g. `days`).
33
-
| The values of the parameters may be expressed as decimal fractions.
34
-
| The values of the parameters may be arbitrarily large.
35
-
| The values of the parameters may be negative.
33
+
| The values of the components may be expressed as decimal fractions.
34
+
| The values of components may be arbitrarily large.
35
+
| The values of components may be negative.
36
36
| The xref:values-and-types/temporal.adoc#cypher-temporal-accessing-components-durations[components of `DURATION` objects] are individually accessible.
37
-
| The `pattern` parameter is constructed from xref:functions/temporal/format.adoc#query-functions-temporal-format-duration-types-characters[Allowed characters for duration types].
37
+
| The `pattern` argument is constructed from xref:functions/temporal/format.adoc#query-functions-temporal-format-duration-types-characters[Allowed characters for duration types].
38
38
39
39
|===
40
40
@@ -132,7 +132,6 @@ RETURN aDuration
132
132
| If `from` has a time component and `to` does not, the time component of `to` is assumed to be midnight, and vice versa.
133
133
| 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.
134
134
| 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.
135
-
| 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].
Copy file name to clipboardExpand all lines: modules/ROOT/pages/functions/temporal/index.adoc
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -395,7 +395,7 @@ The following table lists the supported truncation units and the corresponding s
395
395
| `date(null)` returns `null`.
396
396
| If any of the optional parameters are provided, these will override the corresponding components of `date`.
397
397
| `date(dd)` may be written instead of `+date({date: dd})+`.
398
-
| The `pattern` parameter is constructed from xref:functions/temporal/format.adoc#query-functions-temporal-format-instance-types-characters[Allowed characters for instance types].
398
+
| The `pattern` argument is constructed from xref:functions/temporal/format.adoc#query-functions-temporal-format-instance-types-characters[Allowed characters for instance types].
399
399
400
400
|===
401
401
@@ -920,7 +920,7 @@ RETURN
920
920
| 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.
921
921
| `epochSeconds`/`epochMillis` may be used in conjunction with `nanosecond`.
922
922
| `datetime(null)` returns null.
923
-
| The `pattern` parameter is constructed from xref:functions/temporal/format.adoc#query-functions-temporal-format-instance-types-characters[Allowed characters for instance types].
923
+
| The `pattern` argument is constructed from xref:functions/temporal/format.adoc#query-functions-temporal-format-instance-types-characters[Allowed characters for instance types].
924
924
925
925
|===
926
926
@@ -1671,7 +1671,7 @@ RETURN
1671
1671
| `localdatetime(null)` returns null.
1672
1672
| If any of the optional parameters are provided, these will override the corresponding components of `datetime`, `date` and/or `time`.
1673
1673
| `localdatetime(dd)` may be written instead of `+localdatetime({datetime: dd})+`.
1674
-
| The `pattern` parameter is constructed from xref:functions/temporal/format.adoc#query-functions-temporal-format-instance-types-characters[Allowed characters for instance types].
1674
+
| The `pattern` argument is constructed from xref:functions/temporal/format.adoc#query-functions-temporal-format-instance-types-characters[Allowed characters for instance types].
1675
1675
1676
1676
|===
1677
1677
@@ -2241,7 +2241,7 @@ RETURN
2241
2241
| `localtime(null)` returns null.
2242
2242
| If any of the optional parameters are provided, these will override the corresponding components of `time`.
2243
2243
| `localtime(tt)` may be written instead of `localtime({time: tt})`.
2244
-
| The `pattern` parameter is constructed from xref:functions/temporal/format.adoc#query-functions-temporal-format-instance-types-characters[Allowed characters for instance types].
2244
+
| The `pattern` argument is constructed from xref:functions/temporal/format.adoc#query-functions-temporal-format-instance-types-characters[Allowed characters for instance types].
2245
2245
2246
2246
|===
2247
2247
@@ -2647,7 +2647,7 @@ RETURN
2647
2647
| `time(tt)` may be written instead of `+time({time: tt})+`.
2648
2648
| Selecting a `ZONED TIME` or `ZONED DATETIME` value as the `time` component also selects its timezone. If a `LOCAL TIME` or `LOCAL DATETIME` is selected instead, the default timezone is used. In any case, the timezone can be overridden explicitly.
2649
2649
| 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.
2650
-
| The `pattern` parameter is constructed from xref:functions/temporal/format.adoc#query-functions-temporal-format-instance-types-characters[Allowed characters for instance types].
2650
+
| The `pattern` argument is constructed from xref:functions/temporal/format.adoc#query-functions-temporal-format-instance-types-characters[Allowed characters for instance types].
0 commit comments