ILIAS  trunk Revision v11.0_alpha-1744-gb0451eebef4
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
DateTime.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
22 
27 
31 interface DateTime extends FilterInput
32 {
36  public function withFormat(DateFormat $format): self;
37 
41  public function getFormat(): DateFormat;
42 
46  public function withTimezone(string $tz): self;
47 
51  public function getTimezone(): ?string;
52 
56  public function withMinValue(DateTimeImmutable $datetime): self;
57 
61  public function getMinValue(): ?DateTimeImmutable;
62 
66  public function withMaxValue(DateTimeImmutable $datetime): self;
67 
71  public function getMaxValue(): ?DateTimeImmutable;
72 
76  public function withUseTime(bool $with_time): self;
77 
81  public function getUseTime(): bool;
82 
86  public function withTimeOnly(bool $time_only): self;
87 
91  public function getTimeOnly(): bool;
92 }
withMinValue(DateTimeImmutable $datetime)
Limit accepted values to datetime past (and including) the given $datetime.
$datetime
getUseTime()
Should the input be used to get both date and time?
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getTimezone()
Get the timezone of this input.
getMaxValue()
Return the maximum date the input accepts.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition: Checkbox.php:21
withUseTime(bool $with_time)
Input both date and time.
withFormat(DateFormat $format)
Get an input like this using the given format.
A Date Format provides a format definition akin to PHP&#39;s date formatting options, but stores the sing...
Definition: DateFormat.php:26
withMaxValue(DateTimeImmutable $datetime)
Limit accepted values to datetime before (and including) the given value.
getMinValue()
Return the lowest value the input accepts.
withTimezone(string $tz)
Get an input like this using the given timezone.
This interface must be implemented by all Inputs that support Filter Containers.
Definition: FilterInput.php:35
getFormat()
Get the date-format of this input.
getTimeOnly()
Should the input be used to get a time only?
withTimeOnly(bool $time_only)
Use this Input for a time-value rather than a date.