home *** CD-ROM | disk | FTP | other *** search
/ Australian Personal Computer 1999 April / APC443.iso / features / grpware / coldfus / coldfusi.exe / data1.cab / Documentation / snippets / isleapyear.cfm < prev    next >
Encoding:
Text File  |  1998-10-08  |  789 b   |  43 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. <BODY bgcolor=silver>
  12.  
  13. <H3>IsLeapYear Example</H3>
  14.  
  15. <CFIF IsDefined("form.theTestValue")>
  16.  
  17.     <CFIF IsLeapYear(form.theTestValue)>
  18.     <H3>The year value <CFOUTPUT>#DE(form.theTestValue)#</CFOUTPUT> is a Leap Year</H3>
  19.     <CFELSE>
  20.     <H3>The year value <CFOUTPUT>#DE(form.theTestValue)#</CFOUTPUT> is not a Leap Year</H3>
  21.  
  22.     </CFIF>
  23.  
  24.  
  25. </CFIF>
  26.  
  27. <FORM ACTION="isleapyear.cfm" METHOD="POST">
  28. <P>Enter a year value, and find out if it is a valid Leap Year.
  29.  
  30. <P><INPUT TYPE="Text" NAME="TheTestValue" VALUE="<CFOUTPUT>#Year("#Now()#")#</CFOUTPUT>">
  31.  
  32. <INPUT TYPE="Submit" VALUE="Is it a Leap Year?" NAME="">
  33.  
  34.  
  35. </FORM>
  36.  
  37.  
  38.  
  39. </BODY>
  40.  
  41. </HTML>       
  42.     
  43.