toJSON
Returns the canonical month string (YYYY-MM) used by JSON.stringify. A Month
always serializes to a month-precision string, never an object.
API Reference
Signature
Parameters
None.
Returns
Returns the canonical YYYY-MM string, regardless of any day anchor.
Agent Contract
Agent Notes
JSON.stringifyof aMonthyields a string, not an object; use toObject when you want a{ year, month }shape.toJSONalways stays at month precision; the day anchor never appears.