ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
All Data Structures Namespaces Files Functions Variables Modules Pages
DateTime.php
Go to the documentation of this file.
1 <?php
2 
3 /* Copyright (c) 2019 Nils Haagen <nils.haagen@concepts-and-training.de> Extended GPL, see docs/LICENSE */
4 
6 
8 
12 interface DateTime extends Input
13 {
17  public function withFormat(DateFormat $format) : DateTime;
18 
22  public function getFormat() : DateFormat;
23 
27  public function withTimezone(string $tz) : DateTime;
28 
33  public function getTimezone();
34 
38  public function withMinValue(\DateTimeImmutable $datetime) : DateTime;
39 
44  public function getMinValue();
45 
49  public function withMaxValue(\DateTimeImmutable $datetime) : DateTime;
50 
55  public function getMaxValue();
56 
61  public function withUseTime(bool $with_time) : DateTime;
62 
67  public function getUseTime() : bool;
68 
73  public function withTimeOnly(bool $time_only) : DateTime;
74 
79  public function getTimeOnly() : bool;
80 }
getUseTime()
Should the input be used to get both date and time?
getTimezone()
Get the timezone of this input.
getMaxValue()
Return the maximum date the input accepts.
withUseTime(bool $with_time)
Input both date and time.
withFormat(DateFormat $format)
Get an input like this using the given format.
withMinValue(\DateTimeImmutable $datetime)
Limit accepted values to datetime past (and including) the given $datetime.
withMaxValue(\DateTimeImmutable $datetime)
Limit accepted values to datetime before (and including) the given value.
$format
Definition: metadata.php:218
getMinValue()
Return the lowest value the input accepts.
withTimezone(string $tz)
Get an input like this using the given timezone.
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.