For make data more readable YII provide a application component name as 'formatter' by using this we can format our date,numbers,email.
How to use
$dataFormatter = \Yii::$app->formatter;
echo $dataFormatter->asDate('2016-01-01', 'long');
Out put will be : January 1, 2016
echo $formatter->asEmail('xyz@testing.com');
Out put will be : xyz@testing.com
0 Comment(s)