I have created a loop which will display date 2004 to 2014 in a formatted way. But the problem is, it is showing 204 instead of 2004 and continue this till 209.. So, how to show
Why go through such a long and odd process, when you can do something like this?
Output:
01 Jan 2004
02 Jan 2004
03 Jan 2004
...
29 Dec 2012
30 Dec 2012
31 Dec 2012
This also has the added bonus of not showing "31 Feb 2008" etc., as that date doesn't even exist.
Codepad example of the code (WARNING: long output!)