Control content type availability based on day and time I have a website that delivers products that are ordered during the day.  I would like the order form to only be available during business hours.  Outside of those hours, the form shouldn't be available for ordering.

I am using Webform but I can easily enough create my own content type if needed.  I've looked into using Rules, but I am not sure how to write the rules to accomplish this.

I thought there would already be a quick and easy module for this, but I have not been able to find one.  Any suggestions?
This is quite straight forward with rules.


Create a page called "Order Form Unavailable" with your message about products only being available during the day.
Enable the PHP Filter module.
Create a rule with event "Content is viewed" of type "Order form Webform" (Or whatever)
Add condition "Execute custom PHP code".


Add the following into the PHP text area...

if( (date('H') &lt; 9) &amp;&amp; (date('H') &gt; 17) ){
 // before 9AM and after 5PM
 return TRUE;
}



Add action "Page Redirect" to redirect the user to the "Order Form Unavailable" page.