A leap year check in three instructions

A short, clever write-up showing how to test for leap years in the Gregorian calendar with just three machine instructions, using modular arithmetic tricks.

Tonble
Share X Reddit Bluesky Email
Screenshot of hueffner.de

Stumble onto more like this

One click takes you to a page you didn't know you were looking for. Rate it and the next one lands closer to your taste.

Add to Browser — it's free

Works in Chrome, Edge and Brave. No account needed.