dateFormat['date']; return Time::createFromFormat($format, $value)->toLocalizedString($params[0] ?? 'yyyy-MM-dd'); } public static function set( mixed $value, array $params = [], ?object $helper = null,): string { if ( is_string($value)) { $value = Time::createFromFormat("Y-m-d", $value); } if (! $value instanceof Time) { self::invalidTypeValueError($value); } if (! $helper instanceof BaseConnection) { $message = 'The parameter $helper must be BaseConnection.'; throw new InvalidArgumentException($message); } $format = $helper->dateFormat['date']; return $value->format($format); } }