function($date)
{
// Sets the current date
if (!Str::isNumber($date) && !($date = strtotime($date))) {
return;
}
$t = time();
// Impossible to write history in the future
if ($date > $t) {
$date = $t;
}
$this->date = (float)$date;
}