Description
Subtract firstSourceEndDay from secondSourceStartDay and subtract one more unless sharedBoundaryDay is true.
Calendar coordinates depend on an era, origin, day-start rule, and sometimes an arithmetic rather than observational convention. A supplied coordinate difference does not resolve those choices.
Subtract firstSourceEndDay from secondSourceStartDay and subtract one more unless sharedBoundaryDay is true.
When to use this tool
Use Hijri Source Month Boundary Gap when you need a documented calendar convention or source-coordinate comparison.
How to use the tool and how it works
- Enter firstSourceEndDay, secondSourceStartDay, sharedBoundaryDay. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read gapDays, overlaps. Inspect overlaps before interpreting the associated values.
Subtract firstSourceEndDay from secondSourceStartDay and subtract one more unless sharedBoundaryDay is true. Independently mark overlaps only for a strict earlier second start.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| firstSourceEndDay | First Source End Day | Required. Safe integer. |
| secondSourceStartDay | Second Source Start Day | Required. Safe integer. |
| sharedBoundaryDay | Shared Boundary Day | Required. Boolean. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| gapDays | Gap Days | Required. Safe integer. |
| overlaps | Overlaps | Required. Boolean. |
{
"input": {
"firstSourceEndDay": 100,
"secondSourceStartDay": 102,
"sharedBoundaryDay": false
},
"output": {
"gapDays": 1,
"overlaps": false
}
} Limitations and assumptions
- A shared endpoint may produce different gap signs under the policy without setting overlaps; day coordinates and sources are supplied.
- 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
Consult the source calendar and authoritative date information for actual observance, conversion, or historical dating.
References
Similar or alternative tools
- Public Calendar Day Start Offset
Subtract suppliedDayStart from recordedTime, divide by positive suppliedDayLength with floor for dayIndex, and return a nonnegative withinDay remainder.
- Public Hijri Month Source Gap
Use exact integers for (secondYear - firstYear) × monthsInSuppliedYear + secondMonth - firstMonth.