From 71de77b3391a65bc681aef19afe913776932cb07 Mon Sep 17 00:00:00 2001 From: Yosh de Vos Date: Wed, 7 Jan 2015 12:11:54 +0100 Subject: [PATCH] Change test for leapyearbug by extracting dayofyear in place of setting dayofyear. --- src/Recurr/DateUtil.php | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/Recurr/DateUtil.php b/src/Recurr/DateUtil.php index b85ddff..a256e0f 100644 --- a/src/Recurr/DateUtil.php +++ b/src/Recurr/DateUtil.php @@ -442,12 +442,8 @@ class DateUtil public static function hasLeapYearBug() { - $leapBugTest = \DateTime::createFromFormat('z Y', '80 2016'); - if ($leapBugTest->format('Y-m-d') == '2016-03-22') { - return true; - } - - return false; + $leapBugTest = \DateTime::createFromFormat('Y-m-d', '2016-03-21'); + return $leapBugTest->format('z') != '80'; } /**