| Contents > CFML Reference > ColdFusion Functions > IsLeapYear |
|
|
|
|
||
Determines whether a year is a leap year.
True, if year is a leap year; otherwise, False.
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>
|
|
||
| Contents > CFML Reference > ColdFusion Functions > IsLeapYear |
|
|
ColdFusion 9 | ColdFusion 8 | ColdFusion MX 7 | ColdFusion MX 6.1 | ColdFusion MX | Forums | Developer Center | Bug Reporting
Version 6.1
Comments are no longer accepted for ColdFusion MX 6.1. ColdFusion 8 is the current version.
Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/coldfusion/6.1/htmldocs/funct134.htm