Page 1 of 1

Help !!! URGENT

Posted: Fri May 02, 2003 11:57 pm
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 ..

Posted: Sat May 03, 2003 1:59 am
by m3mn0n
i'd image that would be easy with the date() function.

z The day of the year 0 through 366

Thanks, but still.......

Posted: Sat May 03, 2003 1:21 pm
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:

Posted: Sat May 03, 2003 1:47 pm
by volka
e.g.

Code: Select all

<?php
$d2 = mktime(12, 0, 0, 1, 123, 2003);
echo date('D M j z', $d1);
?>

Thanks a Lot

Posted: Sun May 04, 2003 3:40 am
by igoy
Thanks a Lot Volka. ..

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