DatePeriod::getEndDateGets the end date DescriptionObject-oriented style
public DateTimeInterfacenull DatePeriod::getEndDate()
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 cloned DateTime object representing the end date otherwise. ExamplesExample #1 DatePeriod::getEndDate example
The above examples will output: 2016-05-20T00:00:00+0000 Example #2 DatePeriod::getEndDate without an end date
The above example will output: NULL See Also
|