ILIAS  trunk Revision v11.0_alpha-1713-gd8962da2f67
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
trait.ilDclDatetimeRecordDateFormatter.php File Reference

Go to the source code of this file.

Variables

trait ilDclDatetimeRecordDateFormatter
 

Variable Documentation

◆ 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: buildRTE.php:70

Definition at line 22 of file trait.ilDclDatetimeRecordDateFormatter.php.