Whatever message this page gives is out now! Go check it out!

IsLeapYear

Last update:
May 18, 2026

Description

Determines whether a year is a leap year.

Returns

True, if year is a leap year; False, otherwise.

Category

Syntax

IsLeapYear(year)

See also

Parameters

Parameter
Description
year
Number representing a year

Example

<cfscript>
    year = 2016;
    month = 2;
    day = 28;
    curyear = 2018;
    myDate=CreateDate(year,month,day)  
    leapyear = IsLeapYear(myDate);
    writeoutput("Was #year# a leap year? : " & leapyear & "<br>");
    leapyr = ISLeapYear(curyear);
    writeOutput("Is #curyear# a leap year? : " & leapyr);
</cfscript>
Output
Was 2016 a leap year? : YES

Is 2018 a leap year? : NO

Share this page

Was this page helpful?
We're glad. Tell us how this page helped.
We're sorry. Can you tell us what didn't work for you?
Thank you for your feedback. Your response will help improve this page.

On this page