strtotime
laravel/framework
Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Parse about any English textual datetime description into a Unix timestamp
strtotime
(
string $datetime
, ?
int $baseTimestamp
=
null
):
int
|
false
protected function
replaceBefore
(
$message
,
$attribute
,
$rule
,
$parameters
)
{
if (!
strtotime
(
$parameters
[
0
])) {
return
str_replace
(
':date'
,
$this
->
getDisplayableAttribute
(
$parameters
[
0
]),
$message
);
}
src/Illuminate/Validation/Concerns/ReplacesAttributes.php
}
try {
if ((!
is_string
(
$value
) && !
is_numeric
(
$value
)) ||
strtotime
(
$value
) ===
false
) {
return
false
;
}
} catch (
Exception $e
) {
src/Illuminate/Validation/Concerns/ValidatesAttributes.php