Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Old 10-01-2008, 05:43 AM php date settings
Junior Talker

Posts: 1
Trades: 0
Dear friends,
İ've got an shopping site and have some problems with these codes, Here's the a part of my codes mean;
$item_details['purchase_date'] ==>> User's good order date.

with this codes,i give the user 3 days to pay the cost. i count 3 days after the order day and show him $sold_auctions_content after this 3 days. i do nothing in this 3 days.
here's the my problem. i would like to count only 3 days in Munday,Tuesday,Wednesday,Thursday and Friday. Not include Saturday and Sunday, also 1st January (and other official holidays). Because,the banks doesnt work these days in my country.

two examples:
1-)
if user order a computer in the Monday, he has 3 days to pay (Tuesday,Wednesday,Thursday).. its ok.

2-)
if user order a computer in the Friday, he has 3 days to pay (these days must be Monday,Tuesday,Wednesday. Not saturday,sunday and monday)

How could i do that with these php codes?
P.S : if someone tell me another way , i can use it with pleasure..

With Best Regards
-----------------------------------------------------------------
Here's my codes

$ahmet = date($item_details['purchase_date'] + (03 * 24 * 60 * 60));
$elif = time();
$necati = $elif > $ahmet;
if ($necati)
{
$sold_auctions_content ;
}
booney1983 is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 10-01-2008, 07:22 AM Re: php date settings
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,385
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Use getdate() http://uk3.php.net/getdate and check for [wday] being >0 || <6
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Reply     « Reply to php date settings
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.09693 seconds with 12 queries