You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by sp...@apache.org on 2026/07/23 17:06:09 UTC

(tinkerpop) branch master updated (72f609f521 -> 5c6961320e)

This is an automated email from the ASF dual-hosted git repository.

spmallette pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git


    from 72f609f521 Clarify dateDiff() subtraction direction and result sign in docs
     new 653545b993 Minor adjustments to dateDiff docs. CTR
     new 86680bbc4e Merge branch '3.7-dev' into 3.8-dev
     new 5c6961320e Merge branch '3.8-dev'

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 docs/src/reference/the-traversal.asciidoc | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)


(tinkerpop) 03/03: Merge branch '3.8-dev'

Posted by sp...@apache.org.
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 5c6961320e60568fd2a46216c8718723ebede41b
Merge: 72f609f521 86680bbc4e
Author: Stephen Mallette <st...@amazon.com>
AuthorDate: Thu Jul 23 13:05:56 2026 -0400

    Merge branch '3.8-dev'

 docs/src/reference/the-traversal.asciidoc | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --cc docs/src/reference/the-traversal.asciidoc
index 7524f64d87,7a7b90fd15..94606c60f7
--- a/docs/src/reference/the-traversal.asciidoc
+++ b/docs/src/reference/the-traversal.asciidoc
@@@ -1685,20 -1518,22 +1685,21 @@@ link:++https://tinkerpop.apache.org/jav
  [[dateDiff-step]]
  === DateDiff Step
  
 -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.
 +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.
++
++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 in milliseconds
+ <1> Find the difference between two dates in milliseconds
  
 -NOTE: The `dateDiff(Date)` method is deprecated as of 3.8.0 in favor of `dateDiff(OffsetDateTime)`.
 -
  *Additional References*
  
  link:++https://tinkerpop.apache.org/javadocs/x.y.z/core/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversal.html#dateDiff(java.util.Date)++[`dateDiff(Date)`],


(tinkerpop) 01/03: Minor adjustments to dateDiff docs. CTR

Posted by sp...@apache.org.
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 <st...@amazon.com>
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*
 


(tinkerpop) 02/03: Merge branch '3.7-dev' into 3.8-dev

Posted by sp...@apache.org.
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 86680bbc4efbdd4613397ce2fdd6a1f128b3713f
Merge: fb39ed005a 653545b993
Author: Stephen Mallette <st...@amazon.com>
AuthorDate: Thu Jul 23 13:03:56 2026 -0400

    Merge branch '3.7-dev' into 3.8-dev

 docs/src/reference/the-traversal.asciidoc | 20 ++++++++++++--------
 1 file changed, 12 insertions(+), 8 deletions(-)

diff --cc docs/src/reference/the-traversal.asciidoc
index 21c727d2bd,0b76c4a1ec..7a7b90fd15
--- a/docs/src/reference/the-traversal.asciidoc
+++ b/docs/src/reference/the-traversal.asciidoc
@@@ -1518,17 -1374,19 +1518,21 @@@ link:++https://tinkerpop.apache.org/jav
  [[dateDiff-step]]
  === DateDiff Step
  
- The `dateDiff()`-step (*map*) returns the difference between two Dates in epoch time in milliseconds. 
- If the incoming traverser is not a Date or OffsetDateTime, 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
++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
++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 in milliseconds
 -<1> Find the difference between two dates
++<1> Find the difference between two dates in milliseconds
 +
 +NOTE: The `dateDiff(Date)` method is deprecated as of 3.8.0 in favor of `dateDiff(OffsetDateTime)`.
  
  *Additional References*
  
@@@ -4066,26 -3907,10 +4070,26 @@@ g.V().until(has('name','ripple'))
  <1> do-while semantics stating to do `out()` 2 times.
  <2> while-do semantics stating to break if the traverser is at a vertex named "ripple".
  
 -IMPORTANT: There are two modulators for `repeat()`: `until()` and `emit()`. If `until()` comes after `repeat()` it is
 -do/while looping. If `until()` comes before `repeat()` it is while/do looping. If `emit()` is placed after `repeat()`,
 -it is evaluated on the traversers leaving the repeat-traversal. If `emit()` is placed before `repeat()`, it is
 -evaluated on the traversers prior to entering the repeat-traversal.
 +[gremlin-groovy]
 +----
 +graph = TinkerGraph.open()
 +g = traversal().with(graph)
 +g.io('data/grateful-dead.xml').read().iterate()
 +g.V().has('name','JAM').repeat(out('followedBy').limit(2)).times(3) <1>
 +g.V().has('name','DRUMS').repeat(__.in('followedBy').range(1,3)).until(loops().is(2)) <2>
 +g.V().has('name','HEY BO DIDDLEY').repeat(out('followedBy').skip(5)).times(2) <3>
 +----
 +
 +<1> Starting from the song 'JAM' get 2 songs that have followed, looping 3 times.
 +<2> Starting from the song 'DRUMS' get the 2nd and 3rd songs that have preceded, looping twice.
 +<3> Starting from the song 'HEY BO DIDDLEY' get the songs that have followed, skipping the first 5 and looping twice.
 +
- IMPORTANT: There are three modulators for `repeat()`: `times()`, `until()`, and `emit()`. The most straightforward is 
- `times()`, which indicates the number of times to execute the loop. Conditional loops can be executed using `until()`. 
- If `until()` comes after `repeat()` it is do/while looping. If `until()` comes before `repeat()` it is while/do looping. 
- Emission of traversers from the loop are controlled with `emit()`. If `emit()` is placed after `repeat()`, it is evaluated 
- on the traversers leaving the repeat-traversal. If `emit()` is placed before `repeat()`, it is evaluated on the 
++IMPORTANT: There are three modulators for `repeat()`: `times()`, `until()`, and `emit()`. The most straightforward is
++`times()`, which indicates the number of times to execute the loop. Conditional loops can be executed using `until()`.
++If `until()` comes after `repeat()` it is do/while looping. If `until()` comes before `repeat()` it is while/do looping.
++Emission of traversers from the loop are controlled with `emit()`. If `emit()` is placed after `repeat()`, it is evaluated
++on the traversers leaving the repeat-traversal. If `emit()` is placed before `repeat()`, it is evaluated on the
 +traversers prior to entering the repeat-traversal.
  
  The `repeat()`-step also supports an "emit predicate", where the predicate for an empty argument `emit()` is
  `true` (i.e. `emit() == emit{true}`). With `emit()`, the traverser is split in two -- the traverser exits the code