• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
class CI_Calendar->get_month_name() - Wrong month name for month May

#2
[eluser]xwero[/eluser]
Nice catch but i think CI would be better off using the php functions set_locale and strftime. Then loading of a language file isn't needed to internationalize your app.
Code:
$display = ($this->month_type == 'short')?'%b':'%B';
$month_names = array();

for($i=1, $max=12;$i<=$max;$i++)
{
  $month_names[str_pad($i,2,0,STR_PAD_LEFT)] = strftime($display,mktime(0,0,0,$i,1,1970));
}


Messages In This Thread
class CI_Calendar->get_month_name() - Wrong month name for month May - by El Forum - 09-01-2008, 04:42 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.