ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
Duration.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
22 
26 
30 interface Duration extends Group
31 {
35  public function withFormat(DateFormat $format): Duration;
36 
40  public function getFormat(): DateFormat;
41 
45  public function withMinValue(DateTimeImmutable $date): Duration;
46 
50  public function getMinValue(): ?DateTimeImmutable;
51 
55  public function withMaxValue(DateTimeImmutable $date): Duration;
56 
60  public function getMaxValue(): ?DateTimeImmutable;
61 
65  public function withUseTime(bool $with_time): Duration;
66 
70  public function getUseTime(): bool;
71 
75  public function withTimeOnly(bool $time_only): Duration;
76 
80  public function getTimeOnly(): bool;
81 
85  public function withTimezone(string $tz): Duration;
86 
90  public function getTimezone(): ?string;
91 
95  public function withLabels(string $start_label, string $end_label): Duration;
96 }
This describes the duration input.
Definition: Duration.php:30
withTimeOnly(bool $time_only)
Use this Input for a time-value rather than a date.
withLabels(string $start_label, string $end_label)
Change labels for contained fields.
Describes the monoid operation of grouping form inputs.
Definition: Group.php:31
getMaxValue()
Return the maximum date the input accepts.
withFormat(DateFormat $format)
Get an input like this using the given format.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition: Checkbox.php:21
withMinValue(DateTimeImmutable $date)
Limit accepted values to Duration past (and including) the given $Duration.
getTimezone()
Get the timezone of this input.
A Date Format provides a format definition akin to PHP&#39;s date formatting options, but stores the sing...
Definition: DateFormat.php:26
withUseTime(bool $with_time)
Input both date and time.
$format
Definition: metadata.php:235
withMaxValue(DateTimeImmutable $date)
Limit accepted values to Duration before (and including) the given value.
getFormat()
Get the date-format of this input.
getUseTime()
Should the input be used to get both date and time?
getMinValue()
Return the lowest value the input accepts.
getTimeOnly()
Should the input be used to get a time only?
withTimezone(string $tz)
Get an input like this using the given timezone.