Go to the source code of this file.
◆ ilDclDatetimeRecordDateFormatter
trait ilDclDatetimeRecordDateFormatter |
Initial value:{
protected function formatDateFromString(string $value): string
{
return $this->formatDateFromInt(strtotime($value));
}
protected function formatDateFromInt(
int $timestamp): string
{
$format = $this->getUserDateFormat();
switch ($format) {
return date("d.m.Y", $timestamp);
return date("Y-m-d", $timestamp);
return date("m/d/Y", $timestamp);
default:
return date($format, $timestamp);
}
return $this->
lng->txt(
'no_date');
}
abstract protected function getUserDateFormat(): string
foreach($mandatory_scripts as $file) $timestamp
Definition at line 22 of file trait.ilDclDatetimeRecordDateFormatter.php.