php - Yii Full month name in CGrivView -
i have smth
array( 'name'=>'date', 'type'=>'date', 'value'=>'date("m j, y", $data->date)', ),
and it's showing date in format year/month/day in numbers, want full name of month : 10 september 2014. searched internet, nothing me problem..
try
array( 'name'=>'date', 'type'=>'date', 'value'=>'yii::app()->dateformatter->formatdatetime(cdatetimeparser::parse($data->date, "yyyy-mm-dd"),"medium",null)' ),
edit:
tested code: have tested code may you.
<?php $date=date('yyyy-mm-dd'); $form=yii::app()->dateformatter->formatdatetime(cdatetimeparser::parse($date, "yyyy-mm-dd"),"medium",null); cvardumper::dump($form,100,true); die(); ?>
it returns me
'feb 1, 2014'
Comments
Post a Comment