Help !!! URGENT

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
igoy
Forum Contributor
Posts: 203
Joined: Fri May 02, 2003 11:57 pm
Location: India
Contact:

Help !!! URGENT

Post by igoy »

Hi,
I'm creating a calender for a client where i have to show dates in 30 columns.... having current date in middle (15th col) and previous and next 15 dates respectively . .. anyways. . there are other complex things to be done ..

okay. . . what i want to know is if there is any way we can find out date for perticular day of year .. . like if i try to find day for this date : 3 may 2003.. it is 122nd day of year.... can it be reversed ? can i get date for perticular day of year ?? .. ..

please if anyone knows .... he will be my life saver ..
User avatar
m3mn0n
PHP Evangelist
Posts: 3548
Joined: Tue Aug 13, 2002 3:35 pm
Location: Calgary, Canada

Post by m3mn0n »

i'd image that would be easy with the date() function.

z The day of the year 0 through 366
User avatar
igoy
Forum Contributor
Posts: 203
Joined: Fri May 02, 2003 11:57 pm
Location: India
Contact:

Thanks, but still.......

Post by igoy »

Thank you Sami,
Thanks for replying.. but seems you didn't got what i meant...
I know that using date('z') can get me day of the year for today. . what I want to know is " Is it possible to retrive a date if provided day of year "..

let me explain more .. . let's say today is 3rd May 2003. now this date is 122nd day of this year.... I want to reverse the process.. that is if I want to find out what date is on 200th day of this year .. I hope you understand what I mean... :roll:
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

e.g.

Code: Select all

<?php
$d2 = mktime(12, 0, 0, 1, 123, 2003);
echo date('D M j z', $d1);
?>
User avatar
igoy
Forum Contributor
Posts: 203
Joined: Fri May 02, 2003 11:57 pm
Location: India
Contact:

Thanks a Lot

Post by igoy »

Thanks a Lot Volka. ..

I had figured mktime() could have helped .. . just didn't knew much about timestamps. . .
Thank you again.... :D
Post Reply