public function ScanResultFormatter::formatDateTime in Upgrade Status 8.2
Same name and namespace in other branches
- 8.3 src/ScanResultFormatter.php \Drupal\upgrade_status\ScanResultFormatter::formatDateTime()
- 8 src/ScanResultFormatter.php \Drupal\upgrade_status\ScanResultFormatter::formatDateTime()
Format date/time.
Parameters
int $time: (optional) Timestamp. Current time used if not specified.
string $format: (optional) Format identifier. Default format is used it not specified.
Return value
string Formatted date/time.
File
- src/
ScanResultFormatter.php, line 521
Class
- ScanResultFormatter
- Format scan results for display or export.
Namespace
Drupal\upgrade_statusCode
public function formatDateTime($time = 0, $format = '') {
if (empty($time)) {
$time = $this->time
->getCurrentTime();
}
return $this->dateFormatter
->format($time, $format);
}