<!---
Name:        switch.cfm
Author:      Ben Forta (ben@forta.com)
Description: Demonstrate use of <CFSWITCH> and <CFCASE>
Created:     3/27/01
--->

<HTML>
<HEAD>
   <TITLE>Switch</TITLE>
</HEAD>

<BODY>

<!--- Get day of week --->
<CFSET dow=DayOfWeek(Now())>

<!--- Let the user know --->
<CFSWITCH EXPRESSION="#dow#">

   <!--- Is it Sunday? --->
   <CFCASE VALUE="1">
   It is the weekend! But make the most of it, tomorrow it's back to work.
   </CFCASE>
   
   <!--- Is it Saturday? --->
   <CFCASE VALUE="7">
   It is the weekend! And even better, tomorrow is the weekend too!
   </CFCASE>

   <!--- If code reaches here it'snot the weekend --->
   <CFDEFAULTCASE>
   No, it's not the weekend yet, sorry!	
   </CFDEFAULTCASE>
</CFSWITCH>

</BODY>
</HTML>

