i18n\Formatter $numberFormatterSymbols

$numberFormatterSymbols public property (available since version 2.0.4) A list of name value pairs that are passed to the intl Numberformatter::setSymbol() method of all the number formatter objects created by createNumberFormatter(). This property takes only effect if the PHP intl extension is installed. Please refer to the PHP manual for the possible options. For example to choose a custom currency symbol, e.g. U+20BD instead of руб. for Russian Ruble: [ NumberFormatter::CURRENCY_SYMB

i18n\Formatter $numberFormatterOptions

$numberFormatterOptions public property A list of name value pairs that are passed to the intl Numberformatter::setAttribute() method of all the number formatter objects created by createNumberFormatter(). This property takes only effect if the PHP intl extension is installed. Please refer to the PHP manual for the possible options. For example to adjust the maximum and minimum value of fraction digits you can configure this property like the following: [ NumberFormatter::MIN_FRACTION_D

i18n\Formatter $nullDisplay

$nullDisplay public property The text to be displayed when formatting a null value. Defaults to '<span class="not-set">(not set)</span>', where (not set) will be translated according to $locale. public string $nullDisplay = null

i18n\Formatter $locale

$locale public property The locale ID that is used to localize the date and number formatting. For number and date formatting this is only effective when the PHP intl extension is installed. If not set, yii\base\Application::$language will be used. public string $locale = null

i18n\Formatter $defaultTimeZone

$defaultTimeZone public property (available since version 2.0.1) The time zone that is assumed for input values if they do not include a time zone explicitly. The value must be a valid time zone identifier, e.g. UTC, Europe/Berlin or America/Chicago. Please refer to the php manual for available time zones. It defaults to UTC so you only have to adjust this value if you store datetime values in another time zone in your database. public string $defaultTimeZone = 'UTC'

i18n\Formatter $decimalSeparator

$decimalSeparator public property The character displayed as the decimal point when formatting a number. If not set, the decimal separator corresponding to $locale will be used. If PHP intl extension is not available, the default value is '.'. public string $decimalSeparator = null

i18n\Formatter $datetimeFormat

$datetimeFormat public property The default format string to be used to format a date and time. This can be "short", "medium", "long", or "full", which represents a preset format of different lengths. It can also be a custom format as specified in the ICU manual. Alternatively this can be a string prefixed with php: representing a format that can be recognized by the PHP date()-function. For example: 'MM/dd/yyyy HH:mm:ss' // date and time in ICU format 'php:m/d/Y H:i:s' // the same date and

i18n\Formatter $dateFormat

$dateFormat public property The default format string to be used to format a date. This can be "short", "medium", "long", or "full", which represents a preset format of different lengths. It can also be a custom format as specified in the ICU manual. Alternatively this can be a string prefixed with php: representing a format that can be recognized by the PHP date()-function. For example: 'MM/dd/yyyy' // date in ICU format 'php:m/d/Y' // the same date in PHP format public string $dateForma

i18n\Formatter $currencyCode

$currencyCode public property The 3-letter ISO 4217 currency code indicating the default currency to use for asCurrency(). If not set, the currency code corresponding to $locale will be used. Note that in this case the $locale has to be specified with a country code, e.g. en-US otherwise it is not possible to determine the default currency. public string $currencyCode = null

i18n\Formatter $calendar

$calendar public property (available since version 2.0.7) The calendar to be used for date formatting. The value of this property will be directly passed to the constructor of the IntlDateFormatter class. Defaults to null, which means the Gregorian calendar will be used. You may also explicitly pass the constant \IntlDateFormatter::GREGORIAN for Gregorian calendar. To use an alternative calendar like for example the Jalali calendar, set this property to \IntlDateFormatter::TRADITIONAL. The