Description
Count serial months under explicit endpoint inclusion.
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.
Count serial months under explicit endpoint inclusion.
When to use this tool
Use Month Span Endpoint Inclusion Budget when checking a supplied date-label, duration or interval convention.
How to use the tool and how it works
- Enter startSerial, endSerial, includeStart, includeEnd. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read months. Use the output convention below.
Count serial months under explicit endpoint inclusion. Require startSerial <= endSerial; months = max(0,end-start-1+includeStart+includeEnd).1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| startSerial | Start Serial | Required. Safe integer. |
| endSerial | End Serial | Required. Safe integer. |
| includeStart | Include Start | Required. Boolean. |
| includeEnd | Include End | Required. Boolean. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| months | Months | Required. Safe integer. |
{
"input": {
"startSerial": 12,
"endSerial": 15,
"includeStart": true,
"includeEnd": true
},
"output": {
"months": 4
}
} Limitations and assumptions
- When endpoints coincide, only two inclusive flags give one month; no real date or month length is inferred.
- 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: Date Span Touching Boundary Flag
Distinguish touching date spans from positive-length overlap.
- Calendar Week Span Overlap
Return overlap of two fixed seven-day spans.