year

Static year 

Source
pub static year: YearInternalType
Expand description

p5.js communicates with the clock on your computer. The year() function returns the current year as an integer (2014, 2015, 2016, etc).

Examples

let y = year();
text('Current year: \n' + y, 5, 50);