Skip to content

Commit 6cad915

Browse files
committed
review suggestions
1 parent 8856b01 commit 6cad915

File tree

2 files changed

+12
-13
lines changed

2 files changed

+12
-13
lines changed

modules/ROOT/pages/functions/temporal/duration.adoc

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,22 +19,22 @@ See also xref::values-and-types/temporal.adoc[Temporal values] and xref::express
1919
| *Syntax* 3+| `duration(input[, pattern])`
2020
| *Description* 3+| Creates a `DURATION` value.
2121
.3+| *Arguments* | *Name* | *Type* | *Description*
22-
| `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'.
2323
| `pattern` | `STRING` | A pattern used to parse the input. If a pattern is provided, `input` must be `STRING`.
2424
| *Returns* 3+| `DURATION`
2525
|===
2626

2727
.Considerations
2828
|===
2929

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.
3232
| 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.
3636
| 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].
3838

3939
|===
4040

@@ -132,7 +132,6 @@ RETURN aDuration
132132
| If `from` has a time component and `to` does not, the time component of `to` is assumed to be midnight, and vice versa.
133133
| 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.
134134
| 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].
136135

137136
|===
138137

modules/ROOT/pages/functions/temporal/index.adoc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@ The following table lists the supported truncation units and the corresponding s
395395
| `date(null)` returns `null`.
396396
| If any of the optional parameters are provided, these will override the corresponding components of `date`.
397397
| `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].
399399

400400
|===
401401

@@ -920,7 +920,7 @@ RETURN
920920
| 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.
921921
| `epochSeconds`/`epochMillis` may be used in conjunction with `nanosecond`.
922922
| `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].
924924

925925
|===
926926

@@ -1671,7 +1671,7 @@ RETURN
16711671
| `localdatetime(null)` returns null.
16721672
| If any of the optional parameters are provided, these will override the corresponding components of `datetime`, `date` and/or `time`.
16731673
| `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].
16751675

16761676
|===
16771677

@@ -2241,7 +2241,7 @@ RETURN
22412241
| `localtime(null)` returns null.
22422242
| If any of the optional parameters are provided, these will override the corresponding components of `time`.
22432243
| `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].
22452245

22462246
|===
22472247

@@ -2647,7 +2647,7 @@ RETURN
26472647
| `time(tt)` may be written instead of `+time({time: tt})+`.
26482648
| 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.
26492649
| 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].
26512651

26522652
|===
26532653

0 commit comments

Comments
 (0)