ILIAS  release_8 Revision v8.24
class.ilADTDatePresentationBridge.php
Go to the documentation of this file.
1<?php
2
3declare(strict_types=1);
4
6{
7 protected function isValidADT(ilADT $a_adt): bool
8 {
9 return ($a_adt instanceof ilADTDate);
10 }
11
12 public function getHTML(): string
13 {
14 if (!$this->getADT()->isNull()) {
15 // :TODO: relative dates?
16
17 return $this->decorate(ilDatePresentation::formatDate($this->getADT()->getDate()));
18 }
19 return '';
20 }
21
22 public function getSortable()
23 {
24 if (!$this->getADT()->isNull()) {
25 return (int) $this->getADT()->getDate()->get(IL_CAL_UNIX);
26 }
27 return 0;
28 }
29}
const IL_CAL_UNIX
getSortable()
Get sortable value presentation.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ADT base class.
Definition: class.ilADT.php:12
static formatDate(ilDateTime $date, bool $a_skip_day=false, bool $a_include_wd=false, bool $include_seconds=false)