WLJS LogoWLJS Notebook

LeapYearQ

LeapYearQ[date] returns True if the year corresponding to date is a leap year.

Examples

Check if a year is a leap year:

LeapYearQ[2024]
(* True *)

Check a non-leap year:

LeapYearQ[2023]
(* False *)

Use with a date object:

LeapYearQ[DateObject[{2000, 1, 1}]]
(* True *)

Please visit the official Wolfram Language Reference for more details.

On this page