This is an automated email from the ASF dual-hosted git repository. spmallette pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/tinkerpop.git
commit 653545b9931c83956e1ff2365217a425dd8bd01d Author: Stephen Mallette <[email protected]> AuthorDate: Thu Jul 23 13:00:44 2026 -0400 Minor adjustments to dateDiff docs. CTR --- docs/src/reference/the-traversal.asciidoc | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/docs/src/reference/the-traversal.asciidoc b/docs/src/reference/the-traversal.asciidoc index ea88f03fa1..0b76c4a1ec 100644 --- a/docs/src/reference/the-traversal.asciidoc +++ b/docs/src/reference/the-traversal.asciidoc @@ -1374,15 +1374,19 @@ link:++https://tinkerpop.apache.org/javadocs/x.y.z/core/org/apache/tinkerpop/gre [[dateDiff-step]] === DateDiff Step -The `dateDiff()`-step (*map*) returns the difference between two Dates in epoch time. -If the incoming traverser is not a Date, then an `IllegalArgumentException` will be thrown. +The dateDiff()-step (map) returns the difference between two Dates in epoch time in milliseconds. The result is computed +as the incoming traverser date minus the argument date. A positive result means the incoming date is later than the +argument date, while a negative result means the incoming date is earlier. In the example below, the incoming date +(2023-08-02) is one day earlier than the argument date (2023-08-03), so the result is -86400000 (one day in +milliseconds). If the incoming traverser is not a Date or OffsetDateTime, then an IllegalArgumentException will be +thrown. [gremlin-groovy,modern] ---- g.inject("2023-08-02T00:00:00Z").asDate().dateDiff(constant("2023-08-03T00:00:00Z").asDate()) <1> ---- -<1> Find difference between two dates +<1> Find the difference between two dates *Additional References*
