toObject
Converts the month to a plain object with its display year and month strings
and an _isMonth brand. It is a pure month view: the hidden day anchor is never
included.
API Reference
Signature
Parameters
None.
Returns
Returns a MonthObject: _isMonth is true, year is the four-digit year
string, and month is the zero-padded month string. No day or anchor field is
included.
Agent Contract
Agent Notes
toObject()never exposes the day anchor, andMonth.from(...)object input never reads one. An object round-trip therefore drops the anchor, so day precision is unavailable afterward — keep the string or theMonthinstance if you need the day.- Use
toObject()for a plain month view; use toJSON or toString for string output.