isLeapYear
Description
Determines whether a year is a leap year.
Categories
Related
Syntax
IsLeapYear(year)
Attributes
| Attribute | Description | Required | Default |
|---|---|---|---|
| year | Number representing a year |
Returns
True,
if year is a leap year; False, otherwise.
Example
<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" method="POST">
Enter a year value, and find out whether it is a Leap Year.
<input type = "Text" name = "TheTestValue" value = "
<cfoutput>#Year(Now())#</cfoutput>">
<input type = "Submit" value = "Is it a Leap Year?" name = "">
</form>