year()

Input / Time & Date

Description

Returns the current year as an integer.

Syntax

int year()

Parameters

None

Returns

int

Related

Under the Hood

From Processing.h:

inline int year() { std::time_t t=std::time(nullptr); return std::localtime(&t)->tm_year+1900;} static int year() { std::time_t t=std::time(nullptr); return std::localtime(&t)->tm_year+1900;}