ILIAS  trunk Revision v11.0_alpha-1769-g99a433fe2dc
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
class.ilADTDateTimePresentationBridge.php
Go to the documentation of this file.
1 <?php
2 
19 declare(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 }
decorate($a_value)
Decorate value.
const IL_CAL_UNIX
ADT base class.
Definition: class.ilADT.php:25
static formatDate(ilDateTime $date, bool $a_skip_day=false, bool $a_include_wd=false, bool $include_seconds=false, ?ilObjUser $user=null,)
ADT presentation bridge base class.