[
https://issues.apache.org/jira/browse/TINKERPOP-2978?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17768876#comment-17768876
]
ASF GitHub Bot commented on TINKERPOP-2978:
-------------------------------------------
vkagamlyk commented on code in PR #2223:
URL: https://github.com/apache/tinkerpop/pull/2223#discussion_r1336278629
##########
docs/src/upgrade/release-3.7.x.asciidoc:
##########
@@ -29,6 +29,18 @@ complete list of all the modifications that are part of this
release.
=== Upgrading for Users
+==== Date manipulation functions
+
+Date manipulations in Gremlin queries were only possible using closures, which
may or may not be supported by
+different providers. In 3.7.1, we introduce the `asDate()`, `dateAdd` and
`dateDiff` steps aimed to replace the usage of closure.
+
+The following example demonstrates usage of newly introduced steps:
+
+[source,text]
+----
+gremlin> g.inject("2023-08-02T00:00:00Z").asDate().dateAdd(DT.day,
7).dateDiff(datetime("2023-08-02T00:00:00Z"))
+==>604800
+----
Review Comment:
added in
https://github.com/apache/tinkerpop/pull/2223/commits/cc87521b7c1586aeae4b5a52f57633d628c17286
> Add List Manipulation Steps to Gremlin
> --------------------------------------
>
> Key: TINKERPOP-2978
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2978
> Project: TinkerPop
> Issue Type: Improvement
> Components: language
> Reporter: Cole Greer
> Priority: Major
>
> Today Gremlin requires that users fall back to closures to handle many common
> list manipulation options that users want to do on data in the graph. This
> is a problem for many users as many of the providers prevent the use of
> closures due to the security risks so for these users there is no way to
> manipulate lists directly.
> A full list of proposed functions and semantics is detailed here:
> https://github.com/apache/tinkerpop/blob/3.7.0/docs/src/dev/future/proposal-3-remove-closures.asciidoc
--
This message was sent by Atlassian Jira
(v8.20.10#820010)