3 declare(strict_types=1);
43 $this->type = $a_type;
44 $this->list_item = array();
52 reset($this->list_item);
60 return current($this->list_item);
68 return key($this->list_item);
76 return next($this->list_item);
84 return $this->
current() !==
false;
89 public function get(): array
91 return $this->list_item ?: array();
100 foreach ($this->
get() as $item) {
101 if ($counter++ == $a_pos) {
121 foreach ($other_list->
get() as $new_date) {
122 $this->
add($new_date);
132 if (isset($this->list_item[$unix_remove])) {
133 unset($this->list_item[$unix_remove]);
139 foreach ($this->list_item as
$key => $dt) {
141 unset($this->list_item[
$key]);
151 ksort($this->list_item, SORT_NUMERIC);
157 foreach ($this->
get() as $date) {
get(int $a_format, string $a_format_str='', string $a_tz='')
get formatted date
merge(ilDateList $other_list)
Merge two lists.
add(ilDateTime $date)
add a date to the date list
removeByDAY(ilDateTime $remove)
getAtPosition(int $a_pos)
get item at specific position
static _equals(ilDateTime $start, ilDateTime $end, string $a_compare_field='', string $a_tz='')
Check if two date are equal.