Embarrasing question
It's kind of embarassing to ask this simple question, I'm trying to do this:
I need to run my codes (app) Monday through Friday only. Saturday and Sunday the app. should or can not be run
I read, by default CF set Saturday is day 7 and Sunday as day 1:
<CFIF #DayOfWeek(Now())# IS "1">
<cfabort>
<CFELSEIF #DayOfWeek(Now())# IS "7">
<cfabort>
<CFELSE>
<!--- run the program --->
</CFIF>
I like the following but not sure which one it correct:
<CFIF #DayOfWeek(Now())# IS "1" OR #DayOfWeek(Now())# IS "7" >
<cfabort>
<CFELSE>
<!--- Run the program --->
</CFIF>
OR
<!--- does AND operator means both conditions need to be evaluated at the same time? Saturday and Sunday will never co-exist at the same time so this should be incorrect ? --->
<CFIF #DayOfWeek(Now())# IS "1" AND #DayOfWeek(Now())# IS "7" >
<cfabort>
<CFELSE>
<!--- Run the program --->
</CFIF>
