public function getDateFormatFilter($date, $value = '', $format = 'Y/m/d') { if (is_null($date)) { return $value; } else { return $date->format($format); } }