Happy Coding

Year Percent

This sketch shows what percent we are through the year.

The code uses the Date class to get the start of the year, the end of the year, the current time, and then uses those to calculate the percentage.


This is a companion discussion topic for the original entry at https://happycoding.io/examples/p5js/using-objects/year-percent