Built-in Functions → year

year() is a conversion function that returns the value of the current year.

Signature

year()

Returns

int representing the value of the current year.

Example

Identify the value of the current year.

year()

If the current year is 2022, then this example returns 2022.