normalizeDatetimeValue() protected method
Normalizes the given datetime value as a DateTime object that can be taken by various date/time formatting methods.
protected DateTime|array normalizeDatetimeValue ( $value, $checkTimeInfo = false ) | ||
---|---|---|
$value | integer|string|DateTime |
The datetime value to be normalized. The following types of value are supported:
|
$checkTimeInfo | boolean |
Whether to also check if the date/time value has some time information attached. Defaults to |
return | DateTime|array |
The normalized datetime value. Since version 2.0.1 this may also return an array if |
throws | yii\base\InvalidParamException |
if the input value can not be evaluated as a date value. |
Please login to continue.