Print one year calendar from today in specific format

Hello,

I am having some issues trying to print out a calendar from today upto next year. Say today is April 5, 2013 the calendar should print dates up to April 4, 2014.

The format I need the calendar printed is causing the issue. I can get dates printed from today up to next one year using

 strtotime('+1 year'); and then printing dates from today to next year

But I need the date to come up like this
[table=“width: 350”]
[tr]
[td] [/td]
[td] [/td]
[td] [/td]
[td] [/td]
[td] [/td]
[td] [/td]
[td] [/td]
[td] [/td]
[td] [/td]
[td] [/td]
[td] [/td]
[td] [/td]
[td] [/td]
[td] [/td]
[td] [/td]
[td]APRIL[/td]
[td] [/td]
[td] [/td]
[td] [/td]
[td] [/td]
[td] [/td]
[td] [/td]
[td] [/td]
[td] [/td]
[td] [/td]
[td] [/td]
[td] [/td]
[td] [/td]
[td] [/td]
[td] [/td]
[td] [/td]
[td] [/td]
[td] [/td]
[td]MAY[/td]
[td] [/td]
[/tr]
[tr]
[td]SU[/td]
[td]MO[/td]
[td]TU[/td]
[td]WE[/td]
[td]TH[/td]
[td]FR[/td]
[td]SA[/td]
[td]SU[/td]
[td]MO[/td]
[td]TU[/td]
[td]WE[/td]
[td]TH[/td]
[td]FR[/td]
[td]SA[/td]
[td]SU[/td]
[td]MO[/td]
[td]TU[/td]
[td]WE[/td]
[td]TH[/td]
[td]FR[/td]
[td]SA[/td]
[td]SU[/td]
[td]MO[/td]
[td]TU[/td]
[td]WE[/td]
[td]TH[/td]
[td]FR[/td]
[td]SA[/td]
[td]SU[/td]
[td]MO[/td]
[td]TU[/td]
[td]WE[/td]
[td]TH[/td]
[td]FR[/td]
[td]SA[/td]
[/tr]
[tr]
[td] [/td]
[td] [/td]
[td] [/td]
[td] [/td]
[td] [/td]
[td]5[/td]
[td]6[/td]
[td]7[/td]
[td]8[/td]
[td]9[/td]
[td]10[/td]
[td]11[/td]
[td]12[/td]
[td]13[/td]
[td]14[/td]
[td]15[/td]
[td]16[/td]
[td]17[/td]
[td]18[/td]
[td]19[/td]
[td]20[/td]
[td]21[/td]
[td]22[/td]
[td]23[/td]
[td]24[/td]
[td]25[/td]
[td]26[/td]
[td]27[/td]
[td]28[/td]
[td]29[/td]
[td]30[/td]
[td]1[/td]
[td]2[/td]
[td]3[/td]
[td]4[/td]
[/tr]
[/table]

This for each month up to April 4, 2014. How can this be achieved? Any ideas?

Thanks in advance for all the help

To start with you need to learn how the Gregorian Calendar is structured.

That will give you an idea of how the calendar works and you can then work on a loop.

You could get the current day of the year, day name, day number and also the month, then when a month like in February when you reach 29 you should check whether the year is leap or not and print accordingly but first I do recommend you you do get familiar with the calendar as that will help you figure out correctly what to do on the loop.

Look specially t the part where it shows how many days are in each month as those are constant and is probably the easiest way to get your calendar going.

Took help of this thread

I achieved as per the example I had suggested in my earlier post. I had to loop 3 times once for Month & Year, Once for Day and Once for Date.

Thanks