The year() function in p5.js is used to return the current year from the system clock. It returns an integer value which represents current year.
Parameters: The function does not accept any parameter.
Return Value: It returns an integer value which represent current year.
Below program illustrates the year() function in p5.js:
Example: This example uses year() function to return the current year from the system clock.
- How to get the current weeknumber of the year?
- How to get current year in PHP ?
- How to get the function name inside a function in PHP ?
- PHP | imagecreatetruecolor() Function
- D3.js | d3.utcTuesdays() Function
- PHP | ImagickDraw getTextAlignment() Function
- PHP | Ds\Sequence last() Function
- Function to escape regex patterns before applied in PHP
- PHP | array_udiff_uassoc() Function
- PHP | geoip_continent_code_by_name() Function
- D3.js | d3.map.set() Function
- D3.js easePolyOut Function
- PHP | GmagickPixel setcolor() function
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.