MATHEMATICA FEATURED EXAMPLE
Find Leap Years
By using LeapYearQ with DateDifference, you can find leap years and the intervals between them.
| In[65]:= |
| Out[65]= | ![]() |
| In[66]:= |
| Out[66]= |
While leap years most commonly come in four-year intervals, they sometimes come every eight years. This is because a traditional leap day every four years is actually a slight overcompensation in the calendar. Thus, a leap year is skipped every 100 years when those years are not divisible by 400:
| In[67]:= |
| Out[67]= |
| In[68]:= |
| Out[68]= |


