Description
Return overlap of two fixed seven-day spans.
Date labels and intervals depend on origins, endpoint inclusion and calendar versus elapsed-time conventions. Numeric serial periods and local token formats can represent useful bookkeeping without resolving a real instant or official fiscal rule.
Return overlap of two fixed seven-day spans.
When to use this tool
Use Calendar Week Span Overlap when checking a supplied date-label, duration or interval convention.
How to use the tool and how it works
- Enter firstStartDay, secondStartDay. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read overlapDays, firstEndExclusive, secondEndExclusive. Use the output convention below.
Return overlap of two fixed seven-day spans. overlapDays = max(0,7-abs(secondStartDay-firstStartDay)); each end-exclusive coordinate is start+7.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| firstStartDay | First Start Day | Required. Safe integer. |
| secondStartDay | Second Start Day | Required. Safe integer. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| overlapDays | Overlap Days | Required. Safe integer. |
| firstEndExclusive | First End Exclusive | Required. Safe integer. |
| secondEndExclusive | Second End Exclusive | Required. Safe integer. |
{
"input": {
"firstStartDay": 100,
"secondStartDay": 103
},
"output": {
"overlapDays": 4,
"firstEndExclusive": 107,
"secondEndExclusive": 110
}
} Limitations and assumptions
- These numeric starts share one day basis; no ISO week or real calendar is determined.
- Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
- Numeric calculations use binary floating point unless exact decimal-integer arithmetic is explicitly stated. No hidden measurement tolerance or decimal rounding is added; nonfinite or out-of-contract results are rejected. Numeric signed-zero results are exported as zero.
Alternative or Complementary methods
Use a complete date/time implementation and the applicable calendar policy for actual scheduling and interval interpretation.
References
Similar or alternative tools
- Date Comparison Partial Precision Overlap
Compare two inclusive possible-date envelopes.
- Calendar Interval Single Month Containment
Check whether a half-open date interval stays within one month.