year()
Input / Time & DateDescription
Returns the current year as an integer.
Syntax
int year()
Parameters
None
Returns
intRelated
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;}