ibjdt
Programmer
- Nov 25, 2002
- 63
i want to show 4 messages to my site users concerning my product shipping times:
Saturday and Sunday US EST - no shipping
Prior to 8 am US EST - Shipping not currently available
After 12 noon US EST - call immediately if shipping required today
After 3:30 pm US EST - shipping is no longer available today
i have played around with the following, but i can't get it right and don't understand enough to do anything other than manipulate variables and hope i stumble on the solution.
any help would be greatly appreciated.
my site users are global so it has to consider their time zone.
thanks.
Saturday and Sunday US EST - no shipping
Prior to 8 am US EST - Shipping not currently available
After 12 noon US EST - call immediately if shipping required today
After 3:30 pm US EST - shipping is no longer available today
i have played around with the following, but i can't get it right and don't understand enough to do anything other than manipulate variables and hope i stumble on the solution.
any help would be greatly appreciated.
my site users are global so it has to consider their time zone.
thanks.
Code:
($second, $minute, $hour, $dayOfMonth, $month, $yearOffset, $dayOfWeek, $dayOfYear, $daylightSavings) = gmtime();
if (($dayOfWeek == '0') || ($dayOfWeek == '6')) {
$info{'SHIP_MSG'} = 'Shipping is not available today<br><br>';
}
elsif ($hour > '20') {
$info{'SHIP_MSG'} = 'Shipping is no longer available today<br><br>';
}
elsif ($hour >= '17') {
$info{'SHIP_MSG'} = 'If you need product shipped today, <b>CALL</b> immediately<br><br>';
}
elsif ($hour < '12') {
$info{'SHIP_MSG'} = 'Shipping is not availble during this time.<br><br>';
}