PaoloVIP
(Paolo Visnoviz)
May 13, 2015, 5:05pm
1
I put in my web.cfg (according to "definitive guide 2.0") this:
'components' => [
'formatter' => [
'dateFormat' => 'dd.MM.yyyy',
'decimalSeparator' => ',',
'thousandSeparator' => ' ',
'currencyCode' => 'EUR',
],
],
but now I can use it ? Because in every currency and date fileds nothing was changed.
PaoloVIP
(Paolo Visnoviz)
May 13, 2015, 5:27pm
2
Ah, ok I got it. Simpy using
field:currency in DetailView, for example…
PaoloVIP:
Ah, ok I got it. Simpy using
field:currency in DetailView, for example…
for date: return Yii::$app->formatter->asDate($model->dtPost, 'php:d-m-Y');
for currentcy: return Yii::$app->formatter->asCurrency($model->amount, '111');