ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
Duration.php
Go to the documentation of this file.
1<?php
2
3/* Copyright (c) 2018 Nils Haagen <nils.haagen@concepts-and-training.de> Extended GPL, see docs/LICENSE */
4
6
8
12interface Duration extends Group
13{
18
22 public function getFormat() : DateFormat;
23
27 public function withMinValue(\DateTimeImmutable $date) : Duration;
28
33 public function getMinValue();
34
38 public function withMaxValue(\DateTimeImmutable $date) : Duration;
39
44 public function getMaxValue();
45
50 public function withUseTime(bool $with_time) : Duration;
51
56 public function getUseTime() : bool;
57
62 public function withTimeOnly(bool $time_only) : Duration;
63
68 public function getTimeOnly() : bool;
69
73 public function withTimezone(string $tz) : Duration;
74
79 public function getTimezone();
80}
An exception for terminatinating execution or to throw for unit testing.
A Date Format provides a format definition akin to PHP's date formatting options, but stores the sing...
Definition: DateFormat.php:11
This describes the duration input.
Definition: Duration.php:13
getTimezone()
Get the timezone of this input.
withTimezone(string $tz)
Get an input like this using the given timezone.
withTimeOnly(bool $time_only)
Use this Input for a time-value rather than a date.
getTimeOnly()
Should the input be used to get a time only?
getMaxValue()
Return the maximum date the input accepts.
withMaxValue(\DateTimeImmutable $date)
Limit accepted values to Duration before (and including) the given value.
withUseTime(bool $with_time)
Input both date and time.
withMinValue(\DateTimeImmutable $date)
Limit accepted values to Duration past (and including) the given $Duration.
getMinValue()
Return the lowest value the input accepts.
getUseTime()
Should the input be used to get both date and time?
getFormat()
Get the date-format of this input.
withFormat(DateFormat $format)
Get an input like this using the given format.
This describes a group of inputs.
Definition: Group.php:12
$format
Definition: metadata.php:218