Class humhub\components\i18n\Formatter

Inheritancehumhub\components\i18n\Formatter » yii\i18n\Formatter

Public Properties

Hide inherited properties

PropertyTypeDescriptionDefined By
$dateInputFormat string The default format string to be used to format a input field \humhub\components\i18n\asDate(). humhub\components\i18n\Formatter
$sizeFormatBase humhub\components\i18n\Formatter

Public Methods

Hide inherited methods

MethodDescriptionDefined By
getDateTimePattern() Returns the date pattern for the given $locale and $dateType, $timeType. humhub\components\i18n\Formatter
init() humhub\components\i18n\Formatter
isShowMeridiem() Checks if the time pattern of a given $locale contains a meridiem (AM/PM). humhub\components\i18n\Formatter

Property Details

$dateInputFormat public property

The default format string to be used to format a input field \humhub\components\i18n\asDate(). This mostly used in forms (DatePicker).

See also \humhub\components\i18n\dateFormat.

public string $dateInputFormat 'short'
$sizeFormatBase public property
public $sizeFormatBase 1000

Method Details

getDateTimePattern() public method (available since version 1.2.2)

Returns the date pattern for the given $locale and $dateType, $timeType.

public null|string getDateTimePattern ( $dateType = \IntlDateFormatter::SHORT, $timeType = \IntlDateFormatter::SHORT, $locale null )
$dateType integer
$timeType integer
$locale null
init() public method

public void init ( )
isShowMeridiem() public method (available since version 1.2.2)

Checks if the time pattern of a given $locale contains a meridiem (AM/PM).

If no $locale is provided the Formatter locale will be used.

public boolean isShowMeridiem ( $locale null )
$locale null
return boolean

If the locale uses a 12 hour (AM/PM) otherwise a 24 hour time format is used.