Skip to main content

date-object

$date-object

Expands a Date into a plain object with named calendar fields.

  • '$date-object' or {'$date-object': 'utc'} — UTC fields (default)
  • {'$date-object': 'local'} — local-timezone fields

Output shape: {year, month, day, hour, minute, second, ms, zone} where month is 1–12 (not 0-based), and zone is 'utc' or 'local'.

The output is accepted by $date for round-trip reassembly.