fromIndex
Creates a Month from a raw month index, where index = year * 12 + month - 1.
It is the inverse of the index property and is mainly useful for serialization
or low-level interop.
API Reference
Signature
Parameters
Returns
Returns a new Month for the given index. Indices outside [0, 119999]
(0000-01–9999-12) saturate to the boundary month.
Throws
- Throws when
indexis not a safe integer.
Agent Contract
Agent Notes
- Prefer from for ordinary creation; use
fromIndexonly when you already hold a month index (e.g. frommonth.index). - A
fromIndexvalue has no day anchor, so day-precision output is unavailable.