format_date not working as expected I'm using Drupal 7.38 and I'm trying to print the creation date of a node in 3 separate divs, to be able to format it appart, so I created the following on the node.tpl.php:

            &lt;div class="fecha"&gt;
                &lt;div class="mes"&gt;&lt;?php print $date; ?&gt;&lt;/div&gt;
                &lt;div class="mes"&gt;&lt;?php print format_date($node-&gt;created, 'custom' , 'M'); ?&gt;&lt;/div&gt;
                &lt;div class="dia"&gt;&lt;?php print format_date($node-&gt;created, 'custom' , 't'); ?&gt;&lt;/div&gt;
                &lt;div class="año"&gt;&lt;?php print format_date($node-&gt;created, 'custom' , 'Y'); ?&gt;&lt;/div&gt;
            &lt;/div&gt;


But, when I go to the result page I've got this:

MAR, 07/28/2015 - 16:20

JUL

31

2015

So, why is the day showing the incorrect date???

Thanks.
You should use d for the day of the month. Using t php displays the number of days for the given month. Reference: http://php.net/manual/en/function.date.php