Is this a bug? (date_i18n)
-
Hello. I have found something that may be a bug. And is related to this code.
<?php include('wp-blog-header.php'); echo date_i18n('F' ,strtotime('january')) . '<br>'; echo date_i18n('F' ,strtotime('february')) . '<br>'; echo date_i18n('F' ,strtotime('march')) . '<br>'; echo date_i18n('F' ,strtotime('april')) . '<br>'; echo date_i18n('F' ,strtotime('may')) . '<br>'; echo date_i18n('F' ,strtotime('june')) . '<br>'; echo date_i18n('F' ,strtotime('july')) . '<br>'; echo date_i18n('F' ,strtotime('august')) . '<br>'; echo date_i18n('F' ,strtotime('september')) . '<br>'; echo date_i18n('F' ,strtotime('october')) . '<br>'; echo date_i18n('F' ,strtotime('november')) . '<br>'; echo date_i18n('F' ,strtotime('december')) . '<br>'; ?>And these are the results. As of today (8/31/2012) returns:
enero
marzo
marzo
mayo
mayo
julio
julio
agosto
octubre
octubre
diciembre
diciembreDated yesterday (8/30/2012) returns:
enero
marzo
marzo
abril
mayo
junio
julio
agosto
septiembre
octubre
noviembre
diciembreOn tomorrow (9/1/2012) returns the right thing:
enero
febrero
marzo
abril
mayo
junio
julio
agosto
septiembre
octubre
noviembre
diciembreFrom what I see, it seems that the error occurs if the current day is superior in number to the last day of the following month, skipping it.
What do you think?
The topic ‘Is this a bug? (date_i18n)’ is closed to new replies.