Skip to content

Commit ef697e4

Browse files
Apply suggestions from code review
Co-authored-by: Jens Pryce-Åklundh <[email protected]>
1 parent 7b99147 commit ef697e4

File tree

2 files changed

+11
-8
lines changed

2 files changed

+11
-8
lines changed

modules/ROOT/pages/deprecations-additions-removals-compatibility.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ WITH datetime('2024-06-27T14:30:45.123456789+02:00[Europe/Paris]') AS dt
4141
RETURN format(dt, "yyyy-MM-dd'T'HH:mm:ss.SSSZ") AS x
4242
----
4343

44-
| Cypher's new xref:functions/temporal/format.adoc[format function] can create dynamically formatted string representations of temporal instance and duration types.
44+
| Cypher's new xref:functions/temporal/format.adoc[`format()]` function can create dynamically formatted string representations of temporal instance and duration types.
4545

4646
a|
4747
label:functionality[]

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

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
:description: Cypher provides a function for creating dynamically formatted string representations of temporal instance and duration types.
1+
:description: Information about Cypher's function to format temporal instance and duration values.
22
:table-caption!:
33

44
[[query-functions-temporal-format]]
@@ -7,9 +7,9 @@
77
[[query-functions-temporal-format-function]]
88
== format()
99

10-
The format function creates dynamically formatted string representations of temporal instance and duration types.
10+
The `format()` function creates dynamically formatted string representations of temporal instance and duration types.
1111
The output format can be customized via the `pattern` parameter.
12-
Creating a pattern follows the rules for the link:https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/time/format/DateTimeFormatter.html[Java DateTimeFormatter].
12+
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].
1313
If no pattern is specified, the function returns an ISO-formatted string.
1414

1515
.Details
@@ -25,7 +25,8 @@ If no pattern is specified, the function returns an ISO-formatted string.
2525
[[query-functions-temporal-format-instance-types]]
2626
== Instance types
2727

28-
Cypher's instance types are `DATE`, `LOCAL TIME`, `ZONED TIME`, `LOCAL DATETIME` and `ZONED DATETIME`, refer to xref:/values-and-types/temporal.adoc#cypher-temporal-instants[temporal instants].
28+
Cypher's instance types are `DATE`, `LOCAL TIME`, `ZONED TIME`, `LOCAL DATETIME` and `ZONED DATETIME`.
29+
For more information, see xref:/values-and-types/temporal.adoc#cypher-temporal-instants[Values and types -> temporal instants].
2930

3031
Use the characters in xref:#query-functions-temporal-format-instance-types-characters[] to create a string pattern for instance types.
3132

@@ -232,10 +233,12 @@ The three occurrences of `p` add one space character of padding to the two digit
232233

233234
Use the characters in xref:#query-functions-temporal-format-duration-types-characters[] to create a string pattern for duration types.
234235

235-
Cypher's duration type `DURATION` has components and component groups, see xref:values-and-types/temporal.adoc#cypher-temporal-accessing-components-durations[components of durations].
236+
Cypher's duration type `DURATION` has components and component groups.
237+
For more information, see see xref:values-and-types/temporal.adoc#cypher-temporal-accessing-components-durations[Values and types -> components of durations].
236238

237-
If the string pattern contains a character from a component group but does not contain a character denoting a longer duration from the same group, `format()` converts the longer duration to the equivalent duration with the character that is present, for example a missing `y` (year) will be converted to four quarters, if `q` is present in the string pattern.
238-
This is because without a reference point, there is no way of determining the specifics of a duration.
239+
If the string pattern contains a character from a component group but does not contain a character denoting a longer duration from the same group, `format()` converts the longer duration to the equivalent duration with the character that is present.
240+
For example a missing `y` (year) will be converted to four quarters, if `q` is present in the string pattern.
241+
This is because without a reference point, there is no way to determine the specifics of a duration.
239242

240243

241244
[[query-functions-temporal-format-duration-types-examples]]

0 commit comments

Comments
 (0)