ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilADTDateTimePresentationBridge.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22{
23 protected function isValidADT(ilADT $a_adt): bool
24 {
25 return ($a_adt instanceof ilADTDateTime);
26 }
27
28 public function getHTML(): string
29 {
30 if (!$this->getADT()->isNull()) {
31 // :TODO: relative dates?
32 return $this->decorate(ilDatePresentation::formatDate($this->getADT()->getDate()));
33 }
34 return '';
35 }
36
37 public function getSortable()
38 {
39 if (!$this->getADT()->isNull()) {
40 return (int) $this->getADT()->getDate()->get(IL_CAL_UNIX);
41 }
42 return 0;
43 }
44}
const IL_CAL_UNIX
ADT presentation bridge base class.
ADT base class.
Definition: class.ilADT.php:26
static formatDate(ilDateTime $date, bool $a_skip_day=false, bool $a_include_wd=false, bool $include_seconds=false, ?ilObjUser $user=null,)