asTime() public method
Formats the value as a time.
See also $timeFormat.
public string asTime ( $value, $format = null ) | ||
---|---|---|
$value | integer|string|DateTime |
The value to be formatted. The following types of value are supported:
|
$format | string |
The format used to convert the value into a date string. If null, $timeFormat will be used. 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 |
return | string |
The formatted result. |
throws | yii\base\InvalidParamException |
if the input value can not be evaluated as a date value. |
throws | yii\base\InvalidConfigException |
if the date format is invalid. |
Please login to continue.