Leap Years
List every leap year in a year range in your browser. Gregorian rule stated, exact worked example included.
What this leap years does
The page lists every leap year between the two years you paste, endpoints included: 2020 to 2030 prints 2020, 2024 and 2028 on their own lines. The rule is proleptic Gregorian — divisible by 4, not by 100 unless by 400 — so 2000 lists as leap and 1900 does not. Line order never matters: the earlier year is taken first, so swapping the two lines prints the same list. A line that is not a whole year from 1 to 9999 is refused with its line number and the expected form.
How to use it
Leap Years: paste the first year into the box above, and press Run to get the leap years below.
Worked example
Input:
2020
2030
Output:
2020
2024
2028
Why it runs in your browser
The conversion happens on this page with JavaScript. Your input is not posted to a server, so it works offline after the page loads and nothing is retained anywhere. The page reads first year and returns leap years; reloading the page discards both.
The page lists every leap year between the two years you paste, endpoints included: 2020 to 2030 prints 2020, 2024 and 2028 on their own lines. The rule is proleptic Gregorian — divisible by 4, not by 100 unless by 400 — so 2000 lists as leap and 1900 does not. Line order never matters: the earlier year is taken first, so swapping the two lines prints the same list. A line that is not a whole year from 1 to 9999 is refused with its line number and the expected form.
List every leap year in a year range in your browser. Gregorian rule stated, exact worked example included.
How to use it
Leap Years: paste the first year into the box above, and press Run to get the leap years below.
Why it runs in your browser
The conversion happens on this page with JavaScript. Your input is not posted to a server, so it works offline after the page loads and nothing is retained anywhere. The page reads first year and returns leap years; reloading the page discards both.
What to Expect
Best for
- Converting first year to leap years when the data is already on screen.
What this tool keeps
- Your input is not posted to a server, so it works offline after the page loads and nothing is retained anywhere.
Sample input
2020 2030
Sample output
2020 2024 2028
Frequently asked questions
How do I use the leap years?
Leap Years: paste the first year into the box above, and press Run to get the leap years below.
Is my input uploaded?
No. The text is parsed on this page with JavaScript and is never posted to a server.
Is there a size limit?
Yes: 5 MB per run. Larger input is refused with a message rather than freezing the tab.
Build custom tools for your store
Join the SDK program to create useful ecommerce utilities for your store.