DatePeriod::getEndDateGets the end date DescriptionObject oriented style
public DateTimeInterface DatePeriod::getEndDate
( void
)
Gets the end date of the period. ParametersThis function has no parameters. Return Values
Returns
Returns a DateTimeImmutable object
when the DatePeriod is initialized with a
DateTimeImmutable object
as the Returns a DateTime object otherwise. ExamplesExample #1 DatePeriod::getEndDate example
<?php The above examples will output: 2016-05-20T00:00:00+0000 Example #2 DatePeriod::getEndDate without an end date
<?php The above example will output: NULL See Also
|