spmallette opened a new pull request, #3552:
URL: https://github.com/apache/tinkerpop/pull/3552

   The `dateDiff()` documentation described the step as returning "the 
difference between two Dates" but never stated which operand is subtracted from 
which, so the sign of the result was unexplained. A newcomer running the 
reference example sees a negative value with no indication of why.
   
   This change documents the direction and sign in both places that describe 
the step:
   
   - **`docs/src/reference/the-traversal.asciidoc`** (dateDiff-step): adds 
prose stating the result is computed as the incoming traverser date minus the 
argument date, where a positive result means the incoming date is later and a 
negative result means it is earlier, and explains why the example returns 
`-86400000` (the incoming date is one day earlier than the argument). The live 
example block already renders its `==> -86400000` output.
   - **`docs/src/dev/provider/gremlin-semantics.asciidoc`** (dateDiff()): 
updates the Description to state the same direction and sign meaning, and 
replaces the ambiguous "The first result returned from the traversal will be 
subtracted with the incoming traverser" wording with an explicit "result = 
incoming DATETIME - argument" formulation for both the `value` and 
`dateTraversal` arguments.
   
   This is a documentation-only clarification; the behavior is unchanged and 
was verified against `DateDiffStep` (`Duration.between(argument, incoming)`). 
The docs build renders both sections cleanly.


-- 
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]

Reply via email to