Intersect two half-open time intervals. Touching endpoints have no overlap. Interval contains start and end DateTime values when they overlap, or an empty record otherwise.
Example
The ISO timestamps below are the values carried by DateTime connections. Connect the output of Parse Date or Create DateTime.
{"startA":"2024-01-01T00:00:00.000Z","endA":"2024-01-05T00:00:00.000Z","startB":"2024-01-03T00:00:00.000Z","endB":"2024-01-07T00:00:00.000Z"}
Result
{"overlaps":true,"interval":{"start":"2024-01-03T00:00:00.000Z","end":"2024-01-05T00:00:00.000Z"},"milliseconds":172800000}
Connector data types
| Direction | Connector | Type | Required |
|---|---|---|---|
| Input | startA — Start A | datetime | yes |
| Input | endA — End A | datetime | yes |
| Input | startB — Start B | datetime | yes |
| Input | endB — End B | datetime | yes |
| Output | overlaps — Overlaps | boolean | on success |
| Output | interval — Interval | record | on success |
| Output | milliseconds — Milliseconds | number | on success |
Errors and recovery
Connect four DateTime values. Each ending instant must be at or after the corresponding start. Adjacent intervals yield zero shared milliseconds.
