Parameters & Returns
Parameters
This function takes no parameters.
Returns
Quick Summary
Returns the current year (e.g., 2026).
Takes no parameters.
Returns the year component of the current local date as a four-digit integer.
Technical Exegesis...
Returns the year component of the current local date as a four-digit integer (e.g., 2026). Uses GetLocalTime to retrieve the current system date and extracts the wYear field from the SYSTEMTIME structure.
The returned value represents the full year. Useful for building custom date displays, calculating age, or implementing year-based logic without parsing the full date string.