View Single Post
Old 05-11-2011, 07:15 PM   PM User | #2
Gjslick
Regular Coder

 
Join Date: Feb 2009
Location: NJ, USA
Posts: 476
Thanks: 2
Thanked 70 Times in 69 Posts
Gjslick will become famous soon enough
If statements must be "[comparison] OR [comparison]", not "if something is this OR that".

So your first cfif should look something like this:
Code:
<cfif doy is dayOfYear(createDate(2011, 5, 9)) OR doy is dayOfYear(createDate(2011, 5, 10))>
Your entire if statement block should probably look something along these lines:
Code:
<cfif doy is dayOfYear(createDate(2011, 5, 9)) OR doy is dayOfYear(createDate(2011, 5, 10))>
  12:00pm - 8:00pm
<cfelseif doy is dayofYear(createDate(2011, 5, 11))>
  8:00am - 6:00pm
<cfelseif dow is 2 OR dow is 3 OR dow is 4 OR dow is 5>
  6:00am - 10:00pm
<cfelseif dow is 6>
  6:00am - 8:00pm
<cfelseif dow is 7>
  10:00am - 8:00pm
<cfelseif dow is 1>
  10:00am - 10:00pm
</cfif>
Btw, you don't need to use the # signs inside the <cfif> tag. I removed them in the above code.

-Greg
Gjslick is offline   Reply With Quote
Users who have thanked Gjslick for this post:
drumsinheaven (05-12-2011)