Re: Re: on specific time in the month do script!!
| From: | Justin French | Date: | Thu, 07 Aug 2003 09:59:48 +0000 |
| Subject: | Re: Re: on specific time in the month do script!! | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-158635@lists.php.net to get a copy of this message | ||
Specific Day:
<?
$today = date('j'); // eg 1 - 31
if($today > 2)
{
// show
}
else
{
// don't show
}
?>
Addition of specific time frame of 12noon - 4pm
<?
$today = date('j'); // eg 1 - 31
$hour = date('G'); // eg 0 - 23
if( ($today > 2) && ($hour >= 12 && $hour <= 16) )
{
// show
}
else
{
// don't show
}
?>
Tweak to suit your needs
Justin
On Thursday, August 7, 2003, at 07:35 PM, Nabil wrote:
No i think you get me wrong ... i have already in my web page some articles that i don't want to desplay on the first and second of every month at a specific hours... Please comment "Nabil" <nabil.attar@aws-syria.com> wrote in message news:20030807052939.80115.qmail@pb1.pair.com...HI all; how can i run somthing or a function that only run on every month from the first untill the second on a specific time: in other word : the first two day of every month but it end on like 2pm of the second.. if ( today is 1/of any month untill 2/ of the same month at XX hour ) { return true} else {return false} thanks Nabil-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php --- [This E-mail scanned for viruses]