From e5f44457b223e34e1aa36a415714ee62953fc271 Mon Sep 17 00:00:00 2001 From: Giuseppe Villani Date: Fri, 22 Apr 2022 12:30:44 +0200 Subject: [PATCH 1/3] Fixes #2748: apoc.temporal.toZonedTemporal missing in temporal docs page --- .../pages/temporal/datetime-conversions.adoc | 2 +- .../pages/temporal/temporal-conversions.adoc | 36 +++++++++++++++++++ .../partials/usage/apoc.nodes.cycles.adoc | 2 +- 3 files changed, 38 insertions(+), 2 deletions(-) diff --git a/docs/asciidoc/modules/ROOT/pages/temporal/datetime-conversions.adoc b/docs/asciidoc/modules/ROOT/pages/temporal/datetime-conversions.adoc index b2c09bc1a4..39034a68ea 100644 --- a/docs/asciidoc/modules/ROOT/pages/temporal/datetime-conversions.adoc +++ b/docs/asciidoc/modules/ROOT/pages/temporal/datetime-conversions.adoc @@ -273,7 +273,7 @@ This function parses a date string in a specified format and converts it to a Ne [NOTE] ==== -This function has been renamed to `apoc.temporal.toZonedDateTime` and moved to the temporal section. +This function has been renamed to `apoc.temporal.toZonedTemporal` and moved to the temporal section. See xref::temporal/temporal-conversions.adoc[]. ==== diff --git a/docs/asciidoc/modules/ROOT/pages/temporal/temporal-conversions.adoc b/docs/asciidoc/modules/ROOT/pages/temporal/temporal-conversions.adoc index ee2d3397c9..a75c315ebd 100644 --- a/docs/asciidoc/modules/ROOT/pages/temporal/temporal-conversions.adoc +++ b/docs/asciidoc/modules/ROOT/pages/temporal/temporal-conversions.adoc @@ -119,3 +119,39 @@ RETURN apoc.temporal.format( duration.between( datetime.transaction(), datetime. | Output | "00:00:00.0110" |=== + +== To ZonedDateTime + +You can pass a string to be converted as a 1st parameter, +a pattern to convert the string into a `ZonedDateTime` as a 2nd parameter (default: 'yyyy-MM-dd HH:mm:ss'), +and the timezone as a 3rd parameter (default: 'UTC'). + + +For example, using the default pattern and timezone: + +[source,cypher] +---- +RETURN apoc.temporal.toZonedTemporal('2015-12-23 23:59:59') AS output; +---- + +.Results +[opts="header",cols="1"] +|=== +| Output +| "2015-12-23T23:59:59[UTC]" +|=== + +or: + +[source,cypher] +---- +RETURN apoc.temporal.toZonedTemporal('2012-12-23T23:59:59', "yyyy-MM-dd'T'HH:mm:ss", "Asia/Tokyo") AS output; +---- + +.Results +[opts="header",cols="1"] +|=== +| Output +| "2012-12-23T23:59:59[Asia/Tokyo]" + +|=== diff --git a/docs/asciidoc/modules/ROOT/partials/usage/apoc.nodes.cycles.adoc b/docs/asciidoc/modules/ROOT/partials/usage/apoc.nodes.cycles.adoc index 7391bb63e8..32614360b6 100644 --- a/docs/asciidoc/modules/ROOT/partials/usage/apoc.nodes.cycles.adoc +++ b/docs/asciidoc/modules/ROOT/partials/usage/apoc.nodes.cycles.adoc @@ -48,7 +48,7 @@ Furthermore, we can specify a `maxDepth` to consider cycles with only `n` interm MATCH (m1:Start) WITH collect(m1) as nodes CALL apoc.nodes.cycles(nodes, {maxDepth: 1}) YIELD path RETURN path ---- -image::cycles_max_depth_1.png +image::cycles_max_depth_1.png[width=800] From e5dc3fcf8cf7b8ef85059de7781944f20e1bd286 Mon Sep 17 00:00:00 2001 From: Giuseppe Villani Date: Mon, 9 May 2022 14:28:14 +0200 Subject: [PATCH 2/3] changed note deprecation --- .../modules/ROOT/pages/temporal/datetime-conversions.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/asciidoc/modules/ROOT/pages/temporal/datetime-conversions.adoc b/docs/asciidoc/modules/ROOT/pages/temporal/datetime-conversions.adoc index 39034a68ea..bcce034788 100644 --- a/docs/asciidoc/modules/ROOT/pages/temporal/datetime-conversions.adoc +++ b/docs/asciidoc/modules/ROOT/pages/temporal/datetime-conversions.adoc @@ -273,7 +273,7 @@ This function parses a date string in a specified format and converts it to a Ne [NOTE] ==== -This function has been renamed to `apoc.temporal.toZonedTemporal` and moved to the temporal section. +This function has been deprecated by `apoc.temporal.toZonedTemporal`, therefore it's recommended to use this one instead. See xref::temporal/temporal-conversions.adoc[]. ==== From 0d7661209fe2adf05e0b1a953011f6a28b99addb Mon Sep 17 00:00:00 2001 From: Giuseppe Villani Date: Thu, 12 May 2022 16:46:41 +0200 Subject: [PATCH 3/3] small doc change --- .../modules/ROOT/pages/temporal/datetime-conversions.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/asciidoc/modules/ROOT/pages/temporal/datetime-conversions.adoc b/docs/asciidoc/modules/ROOT/pages/temporal/datetime-conversions.adoc index bcce034788..0ecb023918 100644 --- a/docs/asciidoc/modules/ROOT/pages/temporal/datetime-conversions.adoc +++ b/docs/asciidoc/modules/ROOT/pages/temporal/datetime-conversions.adoc @@ -273,7 +273,7 @@ This function parses a date string in a specified format and converts it to a Ne [NOTE] ==== -This function has been deprecated by `apoc.temporal.toZonedTemporal`, therefore it's recommended to use this one instead. +This function has been deprecated by `apoc.temporal.toZonedTemporal`, therefore it's recommended to use that one instead. See xref::temporal/temporal-conversions.adoc[]. ====