home *** CD-ROM | disk | FTP | other *** search
/ Chip 2002 February / CHIPCD_02_2002.iso / Internet / Macromedia ColdFusion Server 5 / coldfusion-50-win-us.exe / data1.cab / Examples / CFDOCS / snippets / isleapyear.cfm < prev    next >
Encoding:
Text File  |  2001-06-13  |  826 b   |  41 lines

  1. <!--- This example shows the use of IsLeapYear --->
  2.  
  3. <HTML>
  4.  
  5. <HEAD>
  6. <TITLE>
  7. IsLeapYear Example
  8. </TITLE>
  9. </HEAD>
  10.  
  11. <BASEFONT FACE="Arial, Helvetica" SIZE=2>
  12. <BODY  bgcolor="#FFFFD5">
  13.  
  14. <H3>IsLeapYear Example</H3>
  15.  
  16. <CFIF IsDefined("form.theTestValue")>
  17.  
  18.     <CFIF IsLeapYear(form.theTestValue)>
  19.     <H3>The year value <CFOUTPUT>#DE(form.theTestValue)#</CFOUTPUT> is a Leap Year</H3>
  20.     <CFELSE>
  21.     <H3>The year value <CFOUTPUT>#DE(form.theTestValue)#</CFOUTPUT> is not a Leap Year</H3>
  22.  
  23.     </CFIF>
  24.  
  25.  
  26. </CFIF>
  27.  
  28. <FORM ACTION="isleapyear.cfm" METHOD="POST">
  29. <P>Enter a year value, and find out if it is a valid Leap Year.
  30.  
  31. <P><INPUT TYPE="Text" NAME="TheTestValue" VALUE="<CFOUTPUT>#Year(Now())#</CFOUTPUT>">
  32.  
  33. <INPUT TYPE="Submit" VALUE="Is it a Leap Year?" NAME="">
  34.  
  35. </FORM>
  36.  
  37. </BODY>
  38.  
  39. </HTML>       
  40.     
  41.