DatePeriod
class DatePeriod implements IteratorAggregate (View source)
Representation of date period.
Constants
EXCLUDE_START_DATE |
|
INCLUDE_END_DATE
Since: 8.2
|
|
Properties
DateTimeInterface | $start | Start date |
|
DateTimeInterface|null | $current | Current iterator value. |
|
DateTimeInterface|null | $end | End date. |
|
DateInterval | $interval | The interval |
|
int | $recurrences | Number of recurrences. |
|
bool | $include_start_date | Start of period. |
|
bool
Since: 8.2
|
$include_end_date |
Methods
__construct(string $isostr, int $options = 0)
No description
getDateInterval()
Gets the interval
DateTimeInterface|null
getEndDate()
Gets the end date
getStartDate()
Gets the start date
static DatePeriod
__set_state(array $array)
No description
void
__wakeup()
No description
int|null
getRecurrences()
Get the number of recurrences
getIterator()
No description
array
__serialize()
No description
void
__unserialize(array $data)
No description
static DatePeriod
createFromISO8601String(string $specification, int $options = 0)
No description
Details
__construct(string $isostr, int $options = 0)
No description
DateInterval
getDateInterval()
Since: 5.6.5
Gets the interval
DateTimeInterface|null
getEndDate()
Since: 5.6.5
Gets the end date
DateTimeInterface
getStartDate()
Since: 5.6.5
Gets the start date
static DatePeriod
__set_state(array $array)
No description
void
__wakeup()
No description
int|null
getRecurrences()
Since: 7.2.17
Get the number of recurrences
Traversable
getIterator()
Since: 8.0
No description
array
__serialize()
No description
void
__unserialize(array $data)
No description
static DatePeriod
createFromISO8601String(string $specification, int $options = 0)
Since: 8.3
No description