date->year
Returns the year.
Target
Signature
1date->year()Returns the year.
date->year is called with member syntax on a receiver value. date->year handles calendar, duration, or formatting behavior. Store values in structured date or duration form and format them only when presenting text.
Examples
Basic call
1date->yearThe example shows the normal call shape. Adapt variable names, validation, and surrounding error handling to the context.