andreachild commented on code in PR #3090:
URL: https://github.com/apache/tinkerpop/pull/3090#discussion_r2037734774
##########
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversal.java:
##########
@@ -1869,20 +1870,34 @@ public default GraphTraversal<S, Date> dateAdd(final DT
dateToken, final int val
* @return the traversal with an appended {@link DateDiffStep}.
* @see <a
href="http://tinkerpop.apache.org/docs/${project.version}/reference/#dateDiff-step"
target="_blank">Reference Documentation - dateDiff Step</a>
* @since 3.7.1
+ * @deprecated As of release 3.8.0, deprecated in favor of {@link
GraphTraversal#dateDiff(OffsetDateTime)}.
*/
+ @Deprecated
public default GraphTraversal<S, Long> dateDiff(final Date value) {
this.asAdmin().getBytecode().addStep(Symbols.dateDiff, value);
return this.asAdmin().addStep(new DateDiffStep<>(this.asAdmin(),
value));
}
/**
- * Returns the difference between two {@link Date} in epoch time.
+ * Returns the difference between two {@link OffsetDateTime} in epoch time.
+ *
+ * @return the traversal with an appended {@link DateDiffStep}.
+ * @see <a
href="http://tinkerpop.apache.org/docs/${project.version}/reference/#dateDiff-step"
target="_blank">Reference Documentation - dateDiff Step</a>
+ * @since 3.7.1
+ */
+ public default GraphTraversal<S, Long> dateDiff(final OffsetDateTime
value) {
+ this.asAdmin().getBytecode().addStep(Symbols.dateDiff, value);
+ return this.asAdmin().addStep(new DateDiffStep<>(this.asAdmin(),
value));
+ }
+
+ /**
+ * Returns the difference between two {@link OffsetDateTime} in epoch time.
Review Comment:
Nit: could use a comment about the supported traversal types which has been
changed from `Date` to `?`. ie. explain why wasn't it just changed to
`OffsetDateTime`?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]