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
Copy file name to clipboardExpand all lines: modules/ROOT/pages/deprecations-additions-removals-compatibility.adoc
+25Lines changed: 25 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,6 +22,31 @@ Cypher 25 was introduced in Neo4j 2025.06 and can only be used on Neo4j 2025.06+
22
22
Features removed in Cypher 25 are still available on Neo4j 2025.06+ databases either by prepending a query with `CYPHER 5` or by having Cypher 5 as the default language for the database.
23
23
For more information, see xref:queries/select-version.adoc[].
| The following constructors of temporal types have been extended with the optional argument `pattern`:
45
+
xref:functions/temporal/index.adoc#functions-date[date()], xref:functions/temporal/index.adoc#functions-datetime[datetime()], xref:functions/temporal/index.adoc#functions-localdatetime[localdatetime()], xref:functions/temporal/index.adoc#functions-localtime[localtime()], xref:functions/temporal/index.adoc#functions-time[time()] and xref:functions/temporal/duration.adoc#query-functions-temporal-duration[duration()].
46
+
These patterns are the same as those used to create temporal strings with the xref:functions/temporal/format.adoc[`format()`] function introduced in 2025.09 and thus allow for the parsing of temporal strings into temporal values.
| `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
+
| `pattern` | `STRING` | A pattern used to parse the input. If a pattern is provided, `input` must be `STRING`.
23
24
| *Returns* 3+| `DURATION`
24
25
|===
25
26
26
27
.Considerations
27
28
|===
28
29
29
-
| At least one parameter must be provided (`duration()` and `+duration({})+` are invalid).
30
-
| 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.
31
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`).
32
-
| The values of the parameters may be expressed as decimal fractions.
33
-
| The values of the parameters may be arbitrarily large.
34
-
| 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.
35
36
| The xref:values-and-types/temporal.adoc#cypher-temporal-accessing-components-durations[components of `DURATION` objects] are individually accessible.
37
+
| The `pattern` argument is constructed from xref:functions/temporal/format.adoc#query-functions-temporal-format-duration-types-characters[Allowed characters for duration types].
36
38
37
39
|===
38
40
@@ -85,7 +87,8 @@ duration("P14DT16H12M"),
85
87
duration("P5M1.5D"),
86
88
duration("P0.75M"),
87
89
duration("PT0.75M"),
88
-
duration("P2012-02-02T14:37:21.545")
90
+
duration("P2012-02-02T14:37:21.545"),
91
+
duration("5 hours 6 minutes", "h 'hours' m 'minutes'")
| `input` | `ANY` | Either a string representation of a temporal value, a map containing the single key 'timezone', or a map containing temporal values ('date', 'year', 'month', 'day', 'week', 'dayOfWeek', 'quarter', 'dayOfQuarter', 'ordinalDay') as components.
339
+
| `pattern` | `STRING` | A pattern used to parse the input. If a pattern is provided, `input` must be `STRING`.
339
340
| *Returns* 3+| `DATE`
340
341
|===
341
342
343
+
342
344
.Temporal components
343
345
[options="header"]
344
346
|===
@@ -393,6 +395,7 @@ The following table lists the supported truncation units and the corresponding s
393
395
| `date(null)` returns `null`.
394
396
| If any of the optional parameters are provided, these will override the corresponding components of `date`.
395
397
| `date(dd)` may be written instead of `+date({date: dd})+`.
398
+
| The `pattern` argument is constructed from xref:functions/temporal/format.adoc#query-functions-temporal-format-instance-types-characters[Allowed characters for instance types].
396
399
397
400
|===
398
401
@@ -604,7 +607,8 @@ date('2015-07'),
604
607
date('201507'),
605
608
date('2015-W30-2'),
606
609
date('2015202'),
607
-
date('2015')
610
+
date('2015'),
611
+
date('11/18/1986', "MM/dd/yyyy")
608
612
] AS theDate
609
613
RETURN theDate
610
614
----
@@ -620,7 +624,8 @@ RETURN theDate
620
624
| 2015-07-21
621
625
| 2015-07-21
622
626
| 2015-01-01
623
-
1+d|Rows: 6
627
+
| 1986-11-18
628
+
1+d|Rows: 7
624
629
625
630
|===
626
631
@@ -841,10 +846,11 @@ RETURN
841
846
842
847
.Details
843
848
|===
844
-
| *Syntax* 3+| `datetime([ input ])`
849
+
| *Syntax* 3+| `datetime([ input, pattern ])`
845
850
| *Description* 3+| Creates a `ZONED DATETIME` instant.
| `input` | `ANY` | Either a string representation of a temporal value, a map containing the single key 'timezone', or a map containing temporal values ('year', 'month', 'day', 'hour', 'minute', 'second', 'millisecond', 'microsecond', 'nanosecond', 'timezone') as components.
853
+
| `pattern` | `STRING` | A pattern used to parse the input. If a pattern is provided, `input` must be `STRING`.
848
854
| *Returns* 3+| `ZONED DATETIME`
849
855
|===
850
856
@@ -914,6 +920,7 @@ RETURN
914
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.
915
921
| `epochSeconds`/`epochMillis` may be used in conjunction with `nanosecond`.
916
922
| `datetime(null)` returns null.
923
+
| The `pattern` argument is constructed from xref:functions/temporal/format.adoc#query-functions-temporal-format-instance-types-characters[Allowed characters for instance types].
| `input` | `ANY` | Either a string representation of a temporal value, a map containing the single key 'timezone', or a map containing temporal values ('year', 'month', 'day', 'hour', 'minute', 'second', 'millisecond', 'microsecond', 'nanosecond') as components.
1615
+
| `pattern` | `STRING` | A pattern used to parse the input. If a pattern is provided, `input` must be `STRING`.
1606
1616
| *Returns* 3+| `LOCAL DATETIME`
1607
1617
|===
1608
1618
@@ -1661,6 +1671,7 @@ RETURN
1661
1671
| `localdatetime(null)` returns null.
1662
1672
| If any of the optional parameters are provided, these will override the corresponding components of `datetime`, `date` and/or `time`.
1663
1673
| `localdatetime(dd)` may be written instead of `+localdatetime({datetime: dd})+`.
1674
+
| The `pattern` argument is constructed from xref:functions/temporal/format.adoc#query-functions-temporal-format-instance-types-characters[Allowed characters for instance types].
1664
1675
1665
1676
|===
1666
1677
@@ -1829,7 +1840,8 @@ UNWIND [
1829
1840
localdatetime('2015-07-21T21:40:32.142'),
1830
1841
localdatetime('2015-W30-2T214032.142'),
1831
1842
localdatetime('2015-202T21:40:32'),
1832
-
localdatetime('2015202T21')
1843
+
localdatetime('2015202T21'),
1844
+
localdatetime('Tuesday, November 18, AD 1986', 'EEEE, MMMM d, G uuuu')
1833
1845
] AS theDate
1834
1846
RETURN theDate
1835
1847
----
@@ -1843,7 +1855,8 @@ RETURN theDate
1843
1855
| 2015-07-21T21:40:32.142
1844
1856
| 2015-07-21T21:40:32
1845
1857
| 2015-07-21T21:00
1846
-
1+d|Rows: 4
1858
+
| 1986-11-18T00:00Z
1859
+
1+d|Rows: 5
1847
1860
1848
1861
|===
1849
1862
@@ -2179,10 +2192,11 @@ RETURN
2179
2192
2180
2193
.Details
2181
2194
|===
2182
-
| *Syntax* 3+| `localtime([ input ])`
2195
+
| *Syntax* 3+| `localtime([ input, pattern ])`
2183
2196
| *Description* 3+| Creates a `LOCAL TIME` instant.
| `input` | `ANY` | Either a string representation of a temporal value, a map containing the single key 'timezone', or a map containing temporal values ('hour, 'minute', 'second', 'millisecond', 'microsecond', 'nanosecond' as components.
2199
+
| `pattern` | `STRING` | A pattern used to parse the input. If a pattern is provided, `input` must be `STRING`.
2186
2200
| *Returns* 3+| `LOCAL TIME`
2187
2201
|===
2188
2202
@@ -2227,6 +2241,7 @@ RETURN
2227
2241
| `localtime(null)` returns null.
2228
2242
| If any of the optional parameters are provided, these will override the corresponding components of `time`.
2229
2243
| `localtime(tt)` may be written instead of `localtime({time: tt})`.
2244
+
| The `pattern` argument is constructed from xref:functions/temporal/format.adoc#query-functions-temporal-format-instance-types-characters[Allowed characters for instance types].
2230
2245
2231
2246
|===
2232
2247
@@ -2320,7 +2335,8 @@ UNWIND [
2320
2335
localtime('21:40:32.142'),
2321
2336
localtime('214032.142'),
2322
2337
localtime('21:40'),
2323
-
localtime('21')
2338
+
localtime('21'),
2339
+
localtime('6:04', 'k:mm')
2324
2340
] AS theTime
2325
2341
RETURN theTime
2326
2342
----
@@ -2334,7 +2350,8 @@ RETURN theTime
2334
2350
| 21:40:32.142
2335
2351
| 21:40
2336
2352
| 21:00
2337
-
1+d|Rows: 4
2353
+
| 06:04
2354
+
1+d|Rows: 5
2338
2355
2339
2356
|===
2340
2357
@@ -2574,10 +2591,11 @@ RETURN
2574
2591
2575
2592
.Details
2576
2593
|===
2577
-
| *Syntax* 3+| `time([ input ])`
2594
+
| *Syntax* 3+| `time([ input, pattern ])`
2578
2595
| *Description* 3+| Creates a `ZONED TIME` instant.
| `input` | `ANY` | Either a string representation of a temporal value, a map containing the single key 'timezone', or a map containing temporal values ('hour', 'minute', 'second', 'millisecond', 'microsecond', 'nanosecond', 'timezone') as components.
2598
+
| `pattern` | `STRING` | A pattern used to parse the input. If a pattern is provided, `input` must be `STRING`.
2581
2599
| *Returns* 3+| `ZONED TIME`
2582
2600
|===
2583
2601
@@ -2629,6 +2647,7 @@ RETURN
2629
2647
| `time(tt)` may be written instead of `+time({time: tt})+`.
2630
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.
2631
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` argument is constructed from xref:functions/temporal/format.adoc#query-functions-temporal-format-instance-types-characters[Allowed characters for instance types].
0 commit comments