Returns TRUE if the year is a leap year; otherwise, FALSE.
IsLeapYear(year)
Parameter |
Description |
---|---|
year |
Number representing a year |
<!--- This example shows the use of IsLeapYear ---> <html> <head> <title> IsLeapYear Example </title> </head> <body bgcolor = silver> <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"> <P>Enter a year value, and find out if it is a valid Leap Year. <P><input type = "Text" name = "TheTestValue" value = "<cfoutput>#Year(Now())#</cfoutput>"> <input type = "Submit" value = "Is it a Leap Year?" name = ""> </FORM> </body> </html>