Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #2748: apoc.temporal.toZonedTemporal missing in temporal docs page #2821

Merged
merged 3 commits into from
May 19, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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 deprecated by `apoc.temporal.toZonedTemporal`, therefore it's recommended to use that one instead.
See xref::temporal/temporal-conversions.adoc[].
====

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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]"

|===
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change feels unrelated, was it intentional?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, without the [width=800] (more precisely without square brackets), the image is not rendered.




Expand Down