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
Creates a new DatePeriod object
Gets the interval
Gets the end date
Gets the start date
No description
No description
Get the number of recurrences
No description
No description
No description
Creates a new DatePeriod object from an ISO8601 string
Details
__construct(string $isostr, int $options = 0)
Creates a new DatePeriod object
DateInterval
getDateInterval()
Gets the interval
DateTimeInterface|null
getEndDate()
Gets the end date
DateTimeInterface
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
Traversable
getIterator()
No description
array
__serialize()
No description
void
__unserialize(array $data)
No description
static DatePeriod
createFromISO8601String(string $specification, int $options = 0)
Creates a new DatePeriod object from an ISO8601 string
Creates a new DatePeriod object from an ISO8601 string, as specified with specification.