|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2017-08-24 12:36 UTC] cmb@php.net
-Type: Bug
+Type: Feature/Change Request
[2017-08-24 14:49 UTC] requinix@php.net
-Status: Open
+Status: Analyzed
[2017-08-24 14:49 UTC] requinix@php.net
[2017-08-28 08:21 UTC] nyamsprod at gmail dot com
[2019-03-17 18:38 UTC] derick@php.net
[2019-03-17 18:38 UTC] derick@php.net
-Status: Analyzed
+Status: Closed
[2019-03-18 08:43 UTC] cmb@php.net
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 10:00:01 2025 UTC |
Description: ------------ Currently it is not possible to access the DatePeriod recurrences property when no endDate is specified. Expected result: ---------------- $start = new DateTimeImmutable('2012-07-01'); $end = new DateTimeImmutable('2012-07-31'); $interval = new DateInterval('P7D'); $recurrences = 4; $periodWithRecurrences = new DatePeriod($start, $interval, $recurrences); $periodWithRecurrences->getRecurrences(); //returns 4 $periodWithRecurrences->getEndDate(); //returns null $periodWithoutRecurrences = new DatePeriod($start, $interval, $end); $periodWithoutRecurrences->getRecurrences(); //returns null $periodWithoutRecurrences->getEndDate(); //returns DateTimeInterface object equivalent to $end Actual result: -------------- Fatal error: Uncaught Error: Call to undefined method DatePeriod::getRecurrences()