Determines whether a year is a leap year.
True, if year is a leap year; False, otherwise.
Date and time functions, Decision functions
IsLeapYear(year)
| Parameter | Description |
|---|---|
|
year |
Number representing a year |
<h3>IsLeapYear Example</h3>
<cfif IsDefined("FORM.theTestValue")>
<cfif IsLeapYear(FORM.theTestValue)>
<h3>The year value <cfoutput>#DE(FORM.theTestValue)#</cfoutput> is a Leap Year</h3>
<cfelse>
<h3>The year value <cfoutput>#DE(FORM.theTestValue)#</cfoutput> is not a Leap Year</h3>
</cfif>
</cfif>
<form action = "isLeapYear.cfm">
<p>Enter a year value, and find out whether it is a Leap Year.
<p><input type = "Text" name = "TheTestValue" value = "
<cfoutput>#Year(Now())#</cfoutput>">
<input type = "Submit" value = "Is it a Leap Year?" name = "">
</form>