Get the date of this year from the day of year
Posted: Mon Sep 04, 2006 11:49 am
I have the day of this year. (1-365)
I want to get the date it would be this year! (2006) (obviously its always same except on leap years)
Like 04.09
What would be the fastest way to do that?
I can easily get the day of the year through date("z"); but how can I get the day of motnh and month from day of year?
Couldn't think of anything yet except like make if day=1 and year 2006 then date is 01.01.2006, so basicly doing that for all days would be alot. I'm pretty sure there should be a solution to it
I want to get the date it would be this year! (2006) (obviously its always same except on leap years)
Like 04.09
What would be the fastest way to do that?
I can easily get the day of the year through date("z"); but how can I get the day of motnh and month from day of year?
Couldn't think of anything yet except like make if day=1 and year 2006 then date is 01.01.2006, so basicly doing that for all days would be alot. I'm pretty sure there should be a solution to it