Calendar Month Linear Index Inverse
Invert a signed linear proleptic month index using floor division and astronomical year zero.
Description
Invert a signed linear proleptic month index using floor division and astronomical year zero.
A linear month index can be decomposed consistently before and after year zero with floor division.
When to use this tool
Invert a signed linear proleptic month index using floor division and astronomical year zero.
- Prepare the supplied index fields for this operation.
- Compare the complete example with the representation used by your own input before carrying the result into another step.
How to use the tool and how it works
- Enter index. Use the exact text syntax, units and index conventions explained below.
- Run the tool. If input validation fails, correct the supplied fields before interpreting any result.
- Read result.year, result.month. Interpret false, null and empty lists using the distinctions below; they can be valid outputs.
Require index from minus twelve million to twelve million. Return year=floor(index/12) and month=nonnegative modulo(index,12)+1.1
| Input field | Meaning and representation | Accepted input |
|---|---|---|
| index | index. | Integer from -12e6 to 12e6 inclusive |
| Output field | Interpretation |
|---|---|
| result | Object containing the named outputs below. |
| result.year | The year value under the stated formula or text convention. |
| result.month | The month value under the stated formula or text convention. |
{
"input": {
"index": -1
},
"output": {
"result": {
"year": -1,
"month": 12
}
}
} Limitations and assumptions
- This is a mathematical month index, not an epoch timestamp. Its local index bound is narrower than every possible output at the forward converter's upper-year edge.
- Every declared top-level field is required and unexpected fields are rejected. Numeric inputs must be finite; ordinary text fields are bounded to 8,192 UTF-16 code units, with tighter operation-specific limits where stated.
- Lists are limited to 128 entries. JSON text must meet bounded size and depth checks, and numeric outputs beyond the safe finite magnitude are rejected. Exact large integers use decimal strings.
- Indexes are zero-based and spans have an exclusive end unless explicitly stated otherwise. A valid false, null or empty-list result is distinct from malformed input.
Alternative or Complementary methods
Keep elapsed durations, circular clocks, calendar months and epoch offsets distinct. Use a date/time method with explicit timezone and timescale rules for dated instants; arithmetic on one representation does not supply the others.
References
Similar or alternative tools
- Calendar Month Linear Index
Map proleptic year and 1–12 month to an exact linear month index with year zero; no day or timezone conversion.
- Calendar Month Span List
List an inclusive bounded proleptic month span with explicit start and end; rejects backwards or oversized spans.