LeapYearQ
✖
LeapYearQ
Details and Options

- The date can be specified in the following forms:
-
DateObject[…] date object {y,m,d} year, month, day {y,m} the first day of the specified month {y} the first day of the first month of the year y "string" date as a string ("Jan. 1, 2000") number AbsoluteTime specification - The following options can be given:
-
CalendarType "Gregorian" calendar in which the date parameters have been specified
Examples
open allclose allBasic Examples (4)Summary of the most common use cases
Find whether a date is in a leap year:

https://wolfram.com/xid/0g7jns690oz-c3jhzk

Use a compact DateList:

https://wolfram.com/xid/0g7jns690oz-g73n0i

An AbsoluteTime specification is allowed:

https://wolfram.com/xid/0g7jns690oz-558ik


https://wolfram.com/xid/0g7jns690oz-mxobow


https://wolfram.com/xid/0g7jns690oz-y89y0

Options (3)Common values & functionality for each option
CalendarType (3)
A leap year in the Jewish calendar is defined as a year of 13 months:

https://wolfram.com/xid/0g7jns690oz-gkvabd

In the Islamic tabular calendar, leap years are defined as those years that have a 30-day 12th month:

https://wolfram.com/xid/0g7jns690oz-cutd0i

In the Julian calendar, every fourth year is a leap year:

https://wolfram.com/xid/0g7jns690oz-dx6nm6

Applications (1)Sample problems that can be solved with this function
Find the periodicity of leap years in different calendars by analyzing a range of 5000 years:

https://wolfram.com/xid/0g7jns690oz-58l59j
In the Julian calendar, every fourth year is a leap year:

https://wolfram.com/xid/0g7jns690oz-0ys9ma

There are 97 leap years every 400 years in the Gregorian calendar:

https://wolfram.com/xid/0g7jns690oz-v3jcm9

In the Jewish calendar, there are 7 leap years every 19 years:

https://wolfram.com/xid/0g7jns690oz-oge2o6

There are 11 leap years in each cycle of 30 years of the tabular Islamic calendar:

https://wolfram.com/xid/0g7jns690oz-8ikhal

Possible Issues (1)Common pitfalls and unexpected behavior
LeapYearQ accepts both DateList and AbsoluteTime specifications, so numeric inputs are treated as a number of seconds since 1900:

https://wolfram.com/xid/0g7jns690oz-jvu090

For year specifications, either a DateList or DateObject form should be used:

https://wolfram.com/xid/0g7jns690oz-dpdyh


https://wolfram.com/xid/0g7jns690oz-dzhl0u

Wolfram Research (2012), LeapYearQ, Wolfram Language function, https://reference.wolfram.com/language/ref/LeapYearQ.html (updated 2014).
Text
Wolfram Research (2012), LeapYearQ, Wolfram Language function, https://reference.wolfram.com/language/ref/LeapYearQ.html (updated 2014).
Wolfram Research (2012), LeapYearQ, Wolfram Language function, https://reference.wolfram.com/language/ref/LeapYearQ.html (updated 2014).
CMS
Wolfram Language. 2012. "LeapYearQ." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2014. https://reference.wolfram.com/language/ref/LeapYearQ.html.
Wolfram Language. 2012. "LeapYearQ." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2014. https://reference.wolfram.com/language/ref/LeapYearQ.html.
APA
Wolfram Language. (2012). LeapYearQ. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/LeapYearQ.html
Wolfram Language. (2012). LeapYearQ. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/LeapYearQ.html
BibTeX
@misc{reference.wolfram_2025_leapyearq, author="Wolfram Research", title="{LeapYearQ}", year="2014", howpublished="\url{https://reference.wolfram.com/language/ref/LeapYearQ.html}", note=[Accessed: 23-April-2025
]}
BibLaTeX
@online{reference.wolfram_2025_leapyearq, organization={Wolfram Research}, title={LeapYearQ}, year={2014}, url={https://reference.wolfram.com/language/ref/LeapYearQ.html}, note=[Accessed: 23-April-2025
]}