[advanced search]
NamePros Domain Auction
Live Event This Thursday at 6PM EDT - Prebidding open now
18 members in the live chat room. Join Chat!
Register Rules & FAQ NP$ Store Active Threads Mark Forums Read
Go Back   NamePros.Com > Design and Development > Programming
User Name
Password

Old 07-05-2008, 10:47 AM   · #1
w1ww
NamePros Regular
 
w1ww's Avatar
 
Name: Tiago
Location: Mars.
Trader Rating: (15)
Join Date: Oct 2006
Posts: 427
NP$: 79.60 (Donate)
w1ww is a jewel in the roughw1ww is a jewel in the roughw1ww is a jewel in the rough
PHP / Date help

Hello,

Imagine that I want to know what will be the date on the Thursday of week #27 of an year?

For example, now is week #27, year 2008 and the date on Thursday was 03-07-2008 (dd-mm-yyyy).

How can I do that?

Thanks in advance,
Tiago


Please register or log-in into NamePros to hide ads
__________________
w1ww is offline   Reply With Quote
Old 07-05-2008, 11:28 AM   · #2
SecondVersion
while ($awake){ code(); }
 
SecondVersion's Avatar
 
Name: Eric
Location: Kentucky
Trader Rating: (142)
Join Date: Mar 2005
Posts: 4,241
NP$: 386.00 (Donate)
SecondVersion has a reputation beyond reputeSecondVersion has a reputation beyond reputeSecondVersion has a reputation beyond reputeSecondVersion has a reputation beyond reputeSecondVersion has a reputation beyond reputeSecondVersion has a reputation beyond reputeSecondVersion has a reputation beyond reputeSecondVersion has a reputation beyond reputeSecondVersion has a reputation beyond reputeSecondVersion has a reputation beyond reputeSecondVersion has a reputation beyond repute
Member of the Month
MOTM September 2005 Save a Life Child Abuse 9/11/01 :: Never Forget Baby Health Marrow Donor Program AIDS/HIV Breast Cancer Cystic Fibrosis Ethan Allen Fund Animal Cruelty Ethan Allen Fund Ethan Allen Fund Cancer Alzheimer's Protect Our Planet
PHP Code:
<?php

function week($year, $week, $day)
{
    
/**
    * Day is the # of the day, ex:
    *
    * 1 - Monday
    * 2 - Tuesday
    * 3 - Wednesday
    * 4 - Thursday
    * 5 - Friday
    * 6 - Saturday
    * 7 - Sunday
    */
    
return date('m/d/Y', strtotime("$year-W$week-$day"));
}

// returns: 07/03/2008
echo week(2008, 27, 4);

?>
__________________

SecondVersion.com - The Personal Blog of SecondVersion
Domain Name Portfolio - Get your free copy. - Version 1.0.2 now available!!
MetaCreator.com - Free Meta Tag Creator
CodingPlanet.com - Coming soon...
SecondVersion is offline   Reply With Quote
Old 07-05-2008, 11:44 AM   · #3
w1ww
NamePros Regular
 
w1ww's Avatar
 
Name: Tiago
Location: Mars.
Trader Rating: (15)
Join Date: Oct 2006
Posts: 427
NP$: 79.60 (Donate)
w1ww is a jewel in the roughw1ww is a jewel in the roughw1ww is a jewel in the rough
Many thanks, I will give it a try!
__________________
w1ww is offline   Reply With Quote
Reply

NamePros is a revenue sharing forum.

Thread Tools

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


Site Sponsors
http://www.mobisitetrader.com/ Exdon Exdon
Advertise your business at NamePros
All times are GMT -7. The time now is 12:05 PM.


Powered by: vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 2.4.0