Answer the question
In order to leave comments, you need to log in
How to inflect month names in nominative case in yii2?
Months are displayed in the genitive case. Here is a variable that outputs a list of months
$months = array_map(function ($m) {
return Yii::$app->formatter->asDate(mktime(0, 0, 0, $m, 2, 1970), 'php:F ');
}, range(1, 12));
I would like to know how to inflect months into the nominative case using yii? Using pure php I know how It is displayed
like this
Answer the question
In order to leave comments, you need to log in
Make sure that the ICU
set of utilities is installed and available on the server, and then a la
Yii::$app->formatter->asDate(date('Y-m-d'), "LLLL")
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question