Leap Year Algorithm

if year modulo 400 is 0 then leap
else if year modulo 100 is 0 then no_leap
else if year modulo 4 is 0 then leap
else no_leap

Eric Anderson
Eric has been building websites with obsessive detail since Y2K. Before joining Squarespace, he worked at a small web design firm based in San Diego, CA.
Previous
Previous

Next
Next

Contentment