Repository: briannesbitt/Carbon (php)

Issue:
Check month issue 
<!--
    🛑 Important notice to read.

    Before anything else, please search in previous issues (both open and close):
    https://github.com/briannesbitt/Carbon/issues?q=is%3Aissue

    ⚠️ Please don't create an issue about a problem already disccussed or addressed.

    ⚠️ Please check if the documentation (https://carbon.nesbot.com/docs/) answer
    your question or talk about the behavior you're about to describe.

    Note that Carbon extends the PHP DateTime class
    (https://www.php.net/manual/en/class.datetime.php) be sure you report
    a Carbon-specific problem, if the same happens using DateTime,
    refer to https://github.com/php/php-src

    ⚠️ Don't remove this template.
    This issue template applies to all
      - bug reports,
      - feature proposals,
      - and documentation requests

    Having all those information will allow us to know exactly
    what you expect and answer you faster and precisely (answer
    that matches your Carbon version, PHP version and usage).
    
    Note: Comments between <!- - and - -> won't appear in the final
    issue (See [Preview] tab).
-->
Hello,

I encountered an issue with the following code:
<!--
    ⚠️ Your code below (not the code from inside Carbon library)
    Be sure it's dependency-free and enough to reproduce the issue
    when we run it on:
    https://play.phpsandbox.io/embed/nesbot/carbon
-->
```php
        $reportDate = now()->subMonth()->lastOfMonth();
        dd($reportDate->is('May'), $reportDate->is('April'));
```

Carbon version: *** 2.67.0**
<!--
    ⚠️ Run the command `composer show nesbot/carbon` to get "versions"
-->

PHP version: **8.1.2**

<!--
    Use `echo phpversion();`
    to get PHP version.

    Some issues can depends on your context, settings,
    macros, timezone, language. So to be sure the code
    you give is enough to reproduce your bug, try it
    first in:
    https://play.phpsandbox.io/embed/nesbot/carbon?input=%3C%3Fphp%0A%0Aecho%20Carbon%3A%3Aparse('2018-06-01')-%3EsubDay()-%3Emonth%3B

    You can use the [Options] button to change the version
    then when you get the bug with this editor, you can use
    the [Export] button, copy the link of the opened tab,
    then paste it in the issue. Then we can immediately get
    your issue.
-->


I expected to get:

```
true, false
```
<!--
    Always give your expectations. Each use has their owns.
    You may want daylight saving time to be taken into account,
    someone else want it to be ignored. You may want timezone
    to be used in comparisons, someone else may not, etc.
-->

But I actually get:

```
true, true
```
<!--
    If you did not succeed to get the same result in
    https://play.phpsandbox.io/embed/nesbot/carbon?input=%3C%3Fphp%0A%0Aecho%20Carbon%3A%3Aparse('2018-06-01')%3B then precise the
    result you get.
-->

Thanks!


Pull request description:
Fix issue with is month check
Fix #3032

Patch:
diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md
index 33b00378..f05a4225 100644
--- a/.github/ISSUE_TEMPLATE.md
+++ b/.github/ISSUE_TEMPLATE.md
@@ -1,20 +1,5 @@
 <!--
-    🛑 Important notice to read.
-
-    Before anything else, please search in previous issues (both open and close):
-    https://github.com/briannesbitt/Carbon/issues?q=is%3Aissue
-
-    ⚠️ Please don't create an issue about a problem already disccussed or addressed.
-
-    ⚠️ Please check if the documentation (https://carbon.nesbot.com/docs/) answer
-    your question or talk about the behavior you're about to describe.
-
-    Note that Carbon extends the PHP DateTime class
-    (https://www.php.net/manual/en/class.datetime.php) be sure you report
-    a Carbon-specific problem, if the same happens using DateTime,
-    refer to https://github.com/php/php-src
-
-    ⚠️ Don't remove this template.
+    🛑 DON'T REMOVE ME.
     This issue template applies to all
       - bug reports,
       - feature proposals,
diff --git a/composer.json b/composer.json
index 52398d78..d4a00ffd 100644
--- a/composer.json
+++ b/composer.json
@@ -51,13 +51,13 @@
     "require-dev": {
         "doctrine/dbal": "^3.6.3 || ^4.0",
         "doctrine/orm": "^2.15.2 || ^3.0",
-        "friendsofphp/php-cs-fixer": "^3.57.2",
+        "friendsofphp/php-cs-fixer": "^3.52.1",
         "kylekatarnls/multi-tester": "^2.5.3",
         "ondrejmirtes/better-reflection": "^6.25.0.4",
         "phpmd/phpmd": "^2.15.0",
         "phpstan/extension-installer": "^1.3.1",
-        "phpstan/phpstan": "^1.11.2",
-        "phpunit/phpunit": "^10.5.20",
+        "phpstan/phpstan": "^1.10.65",
+        "phpunit/phpunit": "^10.5.15",
         "squizlabs/php_codesniffer": "^3.9.0"
     },
     "provide": {
diff --git a/phpstan.neon b/phpstan.neon
index bd50d810..7ed222fd 100644
--- a/phpstan.neon
+++ b/phpstan.neon
@@ -95,10 +95,6 @@ parameters:
             message: '#^Call to an undefined method Symfony\\Contracts\\Translation\\TranslatorInterface::getMessages\(\)\.#'
             paths:
                 - tests/CarbonInterval/ConstructTest.php
-        -
-            message: '#^Access to protected property Carbon\\CarbonPeriod::\$dateInterval\.#'
-            paths:
-                - tests/CarbonPeriod/CreateTest.php
     excludePaths:
         - '*/src/Carbon/CarbonPeriod.php'
         - '*/src/Carbon/Laravel/ServiceProvider.php'
diff --git a/readme.md b/readme.md
index 36401029..7019a741 100644
--- a/readme.md
+++ b/readme.md
@@ -137,10 +137,10 @@ Support this project by becoming a sponsor. Your logo will show up here with a l
 <a title="Slots City® ➢ Лучшее лицензионно казино онлайн и оффлайн на гривны в Украине. 【 Более1500 игровых автоматов и слотов】✅ Официально и Безопасно" href="https://slotscity.ua/?utm_source=opencollective&amp;utm_medium=github&amp;utm_campaign=Carbon" target="_blank"><img alt="Slots City" src="https://opencollective-production.s3.us-west-1.amazonaws.com/d7e298c0-7abe-11ed-8553-230872f5e54d.png" width="90" height="64"></a>
 <a title="Gives a fun for our users" href="https://slotoking.ua/?utm_source=opencollective&amp;utm_medium=github&amp;utm_campaign=Carbon" target="_blank"><img alt="Ігрові автомати" src="https://opencollective-production.s3.us-west-1.amazonaws.com/account-avatar/94601d07-3205-4c60-9c2d-9b8194dbefb7/skg-blue.png" width="64" height="64"></a>
 <a title="inkedin" href="https://inkedin.com?utm_source=opencollective&amp;utm_medium=github&amp;utm_campaign=Carbon" target="_blank"><img alt="inkedin" src="https://logo.clearbit.com/inkedin.com" width="64" height="64"></a>
+<a title="Актуальний та повносправний рейтинг онлайн казино України, ґрунтований на відгуках реальних гравців." href="https://uk.onlinecasino.in.ua/?utm_source=opencollective&amp;utm_medium=github&amp;utm_campaign=Carbon" target="_blank"><img alt="Онлайн казино України" src="https://opencollective-production.s3.us-west-1.amazonaws.com/c0b4b090-eef8-11ec-9cb7-0527a205b226.png" width="64" height="64"></a>
 <a title="OnlineCasinosSpelen" href="https://onlinecasinosspelen.com?utm_source=opencollective&amp;utm_medium=github&amp;utm_campaign=Carbon" target="_blank"><img alt="OnlineCasinosSpelen" src="https://logo.clearbit.com/onlinecasinosspelen.com" width="64" height="64"></a>
 <a title="Актуальний топ-рейтинг українських онлайн казино на гривні! Щоденне оновлення топу та унікальна система ранжування, основана на відгуках гравців!" href="https://onlinecasino.in.ua/?utm_source=opencollective&amp;utm_medium=github&amp;utm_campaign=Carbon" target="_blank"><img alt="Онлайн Казино Украины" src="https://opencollective-production.s3.us-west-1.amazonaws.com/8fdd8aa0-e273-11ec-a95e-d38fd331cabf.png" width="64" height="64"></a>
 <a title="Parimatch" href="https://parimattchbr.com/?utm_source=opencollective&amp;utm_medium=github&amp;utm_campaign=Carbon" target="_blank"><img alt="Parimatch" src="https://opencollective-production.s3.us-west-1.amazonaws.com/account-avatar/d3d74dd5-49a3-4306-b99e-7445b78a4243/parimatch_-_hero_-_white.png" width="114" height="64"></a>
-<a title="Актуальний та повносправний рейтинг онлайн казино України, ґрунтований на відгуках реальних гравців." href="https://uk.onlinecasino.in.ua/?utm_source=opencollective&amp;utm_medium=github&amp;utm_campaign=Carbon" target="_blank"><img alt="Онлайн казино України" src="https://opencollective-production.s3.us-west-1.amazonaws.com/c0b4b090-eef8-11ec-9cb7-0527a205b226.png" width="64" height="64"></a>
 <a title="Entertainment" href="https://www.nongamstopbets.com/casinos-not-on-gamstop/?utm_source=opencollective&amp;utm_medium=github&amp;utm_campaign=Carbon" target="_blank"><img alt="Non-GamStop Bets UK" src="https://logo.clearbit.com/nongamstopbets.com" width="64" height="64"></a>
 <a title="Job Board for Software Engineers from the US" href="https://devitjobs.com/jobs/Java/all/all?utm_source=opencollective&amp;utm_medium=github&amp;utm_campaign=Carbon" target="_blank"><img alt="DevITJobs.com" src="https://logo.clearbit.com/devitjobs.us" width="64" height="64"></a>
 <a title="Best non Gamstop sites in the UK" href="https://nongamstopcasinos.net/gb/?utm_source=opencollective&amp;utm_medium=github&amp;utm_campaign=Carbon" target="_blank"><img alt="Best non Gamstop sites in the UK" src="https://opencollective-production.s3.us-west-1.amazonaws.com/account-avatar/34e340b8-e1de-4932-8a76-1b3ce2ec7ee8/logo_white%20bg%20(8).png" width="42" height="42"></a>
@@ -152,18 +152,19 @@ Support this project by becoming a sponsor. Your logo will show up here with a l
 <a title="Entertainment" href="https://casinogap.org/uk/?utm_source=opencollective&amp;utm_medium=github&amp;utm_campaign=Carbon" target="_blank" rel="sponsored"><img alt="UK Casino Gap" src="https://opencollective-production.s3.us-west-1.amazonaws.com/account-avatar/143f9301-beec-4118-89d5-9a07a01345f3/casinogap-uk.png" width="32" height="32"></a>
 <a title="NZ Gaming Portal" href="https://casinodeps.co.nz?utm_source=opencollective&amp;utm_medium=github&amp;utm_campaign=Carbon" target="_blank" rel="sponsored"><img alt="NZ Casino Deps" src="https://logo.clearbit.com/casinodeps.co.nz" width="32" height="32"></a>
 <a title="NonStop Sites" href="https://uk.nonstopcasino.org/non-gamstop-casinos/?utm_source=opencollective&amp;utm_medium=github&amp;utm_campaign=Carbon" target="_blank" rel="sponsored"><img alt="NonStopCasino.org" src="https://opencollective-production.s3.us-west-1.amazonaws.com/account-avatar/fd7ad905-8752-468f-ad20-582a24cca9d9/non-stop-casino.png" width="32" height="32"></a>
+<a title="Siti Non AAMS" href="https://www.outlookindia.com/outlook-spotlight/migliori-siti-non-aams-siti-scommesse-senza-licenza-sicuri-news-294715?utm_source=opencollective&amp;utm_medium=github&amp;utm_campaign=Carbon" target="_blank" rel="sponsored"><img alt="Migliori Siti Non AAMS" src="https://opencollective-production.s3.us-west-1.amazonaws.com/account-avatar/392810da-6cb6-4938-a3cb-38bd0e1eb7de/migliori-siti-non-aams.png" width="32" height="32"></a>
 <a title="List of trusted non GamStop casino reviews" href="https://nongamstopcasinos.org?utm_source=opencollective&amp;utm_medium=github&amp;utm_campaign=Carbon" target="_blank" rel="sponsored"><img alt="UK NonGamStopCasinos" src="https://opencollective-production.s3.us-west-1.amazonaws.com/account-avatar/cbda0ee1-26ea-4252-9580-f1f9b317b1f7/nongamstopcasinos-uk.png" width="32" height="32"></a>
 <a title="Online TikTok Video Download Tool" href="https://snaptik.pro?utm_source=opencollective&amp;utm_medium=github&amp;utm_campaign=Carbon" target="_blank" rel="sponsored"><img alt="SnapTik" src="https://opencollective-production.s3.us-west-1.amazonaws.com/account-avatar/546bcd53-6615-457d-ab21-1db1c52b3af5/logo.jpg" width="32" height="32"></a>
 <a title="Proxidize is a mobile proxy creation and management platform that provides all needed components from hardware to cloud software and SIM cards." href="https://proxidize.com/?utm_source=opencollective&amp;utm_medium=github&amp;utm_campaign=Carbon" target="_blank" rel="sponsored"><img alt="Proxidize" src="https://logo.clearbit.com/proxidize.com" width="32" height="32"></a>
 <a title="Buy Instagram Likes - Real Likes &amp; Instant Delivery!" href="https://blastup.com/buy-instagram-likes?utm_source=opencollective&amp;utm_medium=github&amp;utm_campaign=Carbon" target="_blank" rel="sponsored"><img alt="Blastup" src="https://opencollective-production.s3.us-west-1.amazonaws.com/account-avatar/955a0beb-9fe8-4753-ad92-fae8ef5382fc/favicon--dark.jpg" width="32" height="32"></a>
 <a title="BestKru" href="https://bestkru.com/?utm_source=opencollective&amp;utm_medium=github&amp;utm_campaign=Carbon" target="_blank" rel="sponsored"><img alt="BestKru" src="https://logo.clearbit.com/bestkru.com" width="32" height="32"></a>
 <a title="Hall Effect Game Controllers" href="https://www.reddit.com/r/goodsmallgames/comments/1b5w5rf/full_list_of_hall_effect_controllers_pc_xbox_ps5/?utm_source=opencollective&amp;utm_medium=github&amp;utm_campaign=Carbon" target="_blank" rel="sponsored"><img alt="Hall Effect Game Controllers" src="https://logo.clearbit.com/reddit.com" width="32" height="32"></a>
-<a title="Buy TikTok Followers is a leading provider of social media growth solutions for TikTok.com." href="https://buytiktokfollowers.co/?utm_source=opencollective&amp;utm_medium=github&amp;utm_campaign=Carbon" target="_blank" rel="sponsored"><img alt="Buy TikTok Followers" src="https://opencollective-production.s3.us-west-1.amazonaws.com/account-avatar/8626c295-9414-4e0c-b228-38ca2704cd68/btf-favicon.png" width="32" height="32"></a>
-<a title="casinos that accept GamStop players" href="https://www.bsc.news/post/casinos-not-on-gamstop?utm_source=opencollective&amp;utm_medium=github&amp;utm_campaign=Carbon" target="_blank" rel="sponsored"><img alt="Casinos That Accept GamStop Players" src="https://opencollective-production.s3.us-west-1.amazonaws.com/account-avatar/5e3e35b1-647a-489e-86bd-9b80eec34766/NOT%20ON%20GAMSTOP%20SCHEME.png" width="32" height="32"></a>
-<a title="Siti Non AAMS" href="https://www.outlookindia.com/outlook-spotlight/migliori-siti-non-aams-siti-scommesse-senza-licenza-sicuri-news-294715?utm_source=opencollective&amp;utm_medium=github&amp;utm_campaign=Carbon" target="_blank" rel="sponsored"><img alt="Migliori Siti Non AAMS" src="https://opencollective-production.s3.us-west-1.amazonaws.com/account-avatar/392810da-6cb6-4938-a3cb-38bd0e1eb7de/migliori-siti-non-aams.png" width="24" height="24"></a>
-<a title="Vancouver Coir" href="https://www.vancouvercoir.com?utm_source=opencollective&amp;utm_medium=github&amp;utm_campaign=Carbon" target="_blank" rel="sponsored"><img alt="Vancouver Coir" src="https://logo.clearbit.com/vancouvercoir.com" width="24" height="24"></a>
+<a title="rapid trigger keyboard alternatives to wooting" href="https://medium.com/@hlplanet/best-wooting-alternatives-rapid-trigger-keyboards-e2a802890d96?utm_source=opencollective&amp;utm_medium=github&amp;utm_campaign=Carbon" target="_blank" rel="sponsored"><img alt="Wooting Alternatives" src="https://logo.clearbit.com/medium.com" width="64" height="32"></a>
+<a title="Vancouver Coir" href="https://www.vancouvercoir.com?utm_source=opencollective&amp;utm_medium=github&amp;utm_campaign=Carbon" target="_blank" rel="sponsored"><img alt="Vancouver Coir" src="https://logo.clearbit.com/vancouvercoir.com" width="32" height="32"></a>
+<a title="We will boost your Social Media Likes, Followers , Comments &amp; Views. 24/7 hour support. Privacy Assured." href="https://organicsocialboost.com/?utm_source=opencollective&amp;utm_medium=github&amp;utm_campaign=Carbon" target="_blank" rel="sponsored"><img alt="Organic Social Boost" src="https://opencollective-production.s3.us-west-1.amazonaws.com/account-avatar/d6773611-52ed-420e-94ed-e4a48a688f7c/Organic%20Social%20Boost%20Youtube%20Services.png" width="24" height="24"></a>
 <a title="A self-hosted web radio management suite, including turnkey installer tools and an easy-to-use web app to manage your stations." href="https://azuracast.com/?utm_source=opencollective&amp;utm_medium=github&amp;utm_campaign=Carbon" target="_blank" rel="sponsored"><img alt="AzuraCast" src="https://opencollective-production.s3.us-west-1.amazonaws.com/3c12ea10-cdfb-11eb-9cf4-3760b386b76d.png" width="24" height="24"></a>
-<a title="rapid trigger keyboard alternatives to wooting" href="https://medium.com/@hlplanet/best-wooting-alternatives-rapid-trigger-keyboards-e2a802890d96?utm_source=opencollective&amp;utm_medium=github&amp;utm_campaign=Carbon" target="_blank" rel="sponsored"><img alt="Wooting Alternatives" src="https://logo.clearbit.com/medium.com" width="48" height="24"></a>
+<a title="Helping people" href="https://glitteringgenerality.com?utm_source=opencollective&amp;utm_medium=github&amp;utm_campaign=Carbon" target="_blank" rel="sponsored"><img alt="GlitteringGenerality" src="https://images.opencollective.com/glitteringgeneralityy/avatar/256.png" width="24" height="24"></a>
+<a title="Wagerbit" href="https://reddit.com/r/wagerbit?utm_source=opencollective&amp;utm_medium=github&amp;utm_campaign=Carbon" target="_blank" rel="sponsored"><img alt="Wagerbit" src="https://opencollective-production.s3.us-west-1.amazonaws.com/account-avatar/b8b578f6-e292-4670-b904-b8c0da9a7350/Wagerbit%20reddit.png" width="24" height="24"></a>
 <a title="Triplebyte is the first software engineering job platform that is on the developer&#039;s side. Take our coding quiz!" href="https://triplebyte.com/os/opencollective?utm_source=opencollective&amp;utm_medium=github&amp;utm_campaign=Carbon" target="_blank" rel="sponsored"><img alt="Triplebyte" src="https://opencollective-production.s3.us-west-1.amazonaws.com/43e4f9d0-30cd-11ea-9c6b-e1142996e8b2.png" width="24" height="24"></a>
 <a title="Connect your Collective to GitHub Sponsors: https://docs.opencollective.com/help/collectives/github-sponsors" href="https://github.com/sponsors/?utm_source=opencollective&amp;utm_medium=github&amp;utm_campaign=Carbon" target="_blank" rel="sponsored"><img alt="GitHub Sponsors" src="https://opencollective-production.s3.us-west-1.amazonaws.com/87b1d240-f617-11ea-9960-fd7e8ab20fe4.png" width="27" height="24"></a>
 <a title="Salesforce" href="https://engineering.salesforce.com?utm_source=opencollective&amp;utm_medium=github&amp;utm_campaign=Carbon" target="_blank" rel="sponsored"><img alt="Salesforce" src="https://opencollective-production.s3.us-west-1.amazonaws.com/24d34880-df8d-11e9-949c-6bc2037b6bd5.png" width="24" height="24"></a>
diff --git a/src/Carbon/CarbonPeriod.php b/src/Carbon/CarbonPeriod.php
index 9863b9a8..506d63ea 100644
--- a/src/Carbon/CarbonPeriod.php
+++ b/src/Carbon/CarbonPeriod.php
@@ -44,6 +44,7 @@ use ReflectionException;
 use ReturnTypeWillChange;
 use RuntimeException;
 use Throwable;
+use TypeError;
 
 // @codeCoverageIgnoreStart
 require PHP_VERSION < 8.2
@@ -213,6 +214,13 @@ class CarbonPeriod extends DatePeriodBase implements Countable, JsonSerializable
      */
     public const END_ITERATION = [self::class, 'endIteration'];
 
+    /**
+     * Exclude start date from iteration.
+     *
+     * @var int
+     */
+    public const EXCLUDE_START_DATE = 1;
+
     /**
      * Exclude end date from iteration.
      *
@@ -434,7 +442,7 @@ class CarbonPeriod extends DatePeriodBase implements Countable, JsonSerializable
      * Return whether given variable is an ISO 8601 specification.
      *
      * Note: Check is very basic, as actual validation will be done later when parsing.
-     * We just want to ensure that variable is not any other type of valid parameter.
+     * We just want to ensure that variable is not any other type of a valid parameter.
      */
     protected static function isIso8601(mixed $var): bool
     {
@@ -685,7 +693,48 @@ class CarbonPeriod extends DatePeriodBase implements Countable, JsonSerializable
             ];
         }
 
-        $this->setFromAssociativeArray($sortedArguments);
+        if ($raw === null && \is_string($arguments[0] ?? null) && substr_count($arguments[0], '/') >= 1) {
+            $raw = [$arguments[0]];
+        }
+
+        $constructed = false;
+
+        if ($raw !== null) {
+            try {
+                parent::__construct(...$raw);
+                $constructed = true;
+            } catch (TypeError) {
+                // $constructed = false
+            }
+        }
+
+        if (!$constructed) {
+            parent::__construct('R1/2000-01-01T00:00:00Z/P1D');
+        }
+
+        if (isset($sortedArguments['start'])) {
+            $this->setStartDate($sortedArguments['start']);
+        }
+
+        if (isset($sortedArguments['start'])) {
+            $this->setStartDate($sortedArguments['start']);
+        }
+
+        if (isset($sortedArguments['end'])) {
+            $this->setEndDate($sortedArguments['end']);
+        }
+
+        if (isset($sortedArguments['recurrences'])) {
+            $this->setRecurrences($sortedArguments['recurrences']);
+        }
+
+        if (isset($sortedArguments['interval'])) {
+            $this->setDateInterval($sortedArguments['interval']);
+        }
+
+        if (isset($sortedArguments['options'])) {
+            $this->setOptions($sortedArguments['options']);
+        }
 
         if ($this->startDate === null) {
             $dateClass = $this->dateClass;
@@ -702,12 +751,6 @@ class CarbonPeriod extends DatePeriodBase implements Countable, JsonSerializable
             $this->setOptions(0);
         }
 
-        parent::__construct(
-            $this->startDate,
-            $this->dateInterval,
-            $this->endDate ?? $this->recurrences ?? 1,
-            $this->options,
-        );
         $this->constructed = true;
     }
 
@@ -2514,31 +2557,4 @@ class CarbonPeriod extends DatePeriodBase implements Countable, JsonSerializable
             }
         }
     }
-
-    private function setFromAssociativeArray(array $parameters): void
-    {
-        if (isset($parameters['start'])) {
-            $this->setStartDate($parameters['start']);
-        }
-
-        if (isset($parameters['start'])) {
-            $this->setStartDate($parameters['start']);
-        }
-
-        if (isset($parameters['end'])) {
-            $this->setEndDate($parameters['end']);
-        }
-
-        if (isset($parameters['recurrences'])) {
-            $this->setRecurrences($parameters['recurrences']);
-        }
-
-        if (isset($parameters['interval'])) {
-            $this->setDateInterval($parameters['interval']);
-        }
-
-        if (isset($parameters['options'])) {
-            $this->setOptions($parameters['options']);
-        }
-    }
 }
diff --git a/src/Carbon/Factory.php b/src/Carbon/Factory.php
index 022aa1c1..097f9f62 100644
--- a/src/Carbon/Factory.php
+++ b/src/Carbon/Factory.php
@@ -203,9 +203,9 @@ class Factory
         'v' => '([0-9]{1,3})',
         'e' => '([a-zA-Z]{1,5})|([a-zA-Z]*\\/[a-zA-Z]*)',
         'I' => '(0|1)',
-        'O' => '([+-](1[0123]|0[0-9])[0134][05])',
-        'P' => '([+-](1[0123]|0[0-9]):[0134][05])',
-        'p' => '(Z|[+-](1[0123]|0[0-9]):[0134][05])',
+        'O' => '([+-](1[012]|0[0-9])[0134][05])',
+        'P' => '([+-](1[012]|0[0-9]):[0134][05])',
+        'p' => '(Z|[+-](1[012]|0[0-9]):[0134][05])',
         'T' => '([a-zA-Z]{1,5})',
         'Z' => '(-?[1-5]?[0-9]{1,4})',
         'U' => '([0-9]*)',
diff --git a/src/Carbon/Traits/Comparison.php b/src/Carbon/Traits/Comparison.php
index de26ef56..3c28fdcb 100644
--- a/src/Carbon/Traits/Comparison.php
+++ b/src/Carbon/Traits/Comparison.php
@@ -881,6 +881,13 @@ trait Comparison
             return $this->year === (int) $tester;
         }
 
+        if (preg_match('/^(?:Jan|January|Feb|February|Mar|March|Apr|April|May|Jun|June|Jul|July|Aug|August|Sep|September|Oct|October|Nov|November|Dec|December)$/i', $tester)) {
+            return $this->isSameMonth(
+                $this->transmitFactory(static fn () => static::parse($tester)),
+                false,
+            );
+        }
+
         if (preg_match('/^\d{3,}-\d{1,2}$/', $tester)) {
             return $this->isSameMonth(
                 $this->transmitFactory(static fn () => static::parse($tester)),
diff --git a/src/Carbon/Traits/Difference.php b/src/Carbon/Traits/Difference.php
index defbe820..8fb9bbd8 100644
--- a/src/Carbon/Traits/Difference.php
+++ b/src/Carbon/Traits/Difference.php
@@ -268,8 +268,7 @@ trait Difference
 
         if (!$compareUsingUtc) {
             $minutes = $interval->i + ($interval->s + $interval->f) / static::SECONDS_PER_MINUTE;
-            // 24 hours means there is a DST bug
-            $hours = ($interval->h === 24 && $interval->days !== false ? 0 : $interval->h) + $minutes / static::MINUTES_PER_HOUR;
+            $hours = $interval->h + $minutes / static::MINUTES_PER_HOUR;
 
             return $this->getIntervalDayDiff($interval)
                 + ($interval->invert ? -$hours : $hours) / static::HOURS_PER_DAY;


Test patch:
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
index 908fcaf0..5e038050 100644
--- a/.github/workflows/tests.yml
+++ b/.github/workflows/tests.yml
@@ -8,7 +8,7 @@ jobs:
       fail-fast: false
       matrix:
         os: [ubuntu, windows]
-        php: [8.1, 8.2, 8.3, 8.4]
+        php: [8.1, 8.2, 8.3]
         setup: [lowest, stable]
         include:
           - php: 8.1
@@ -75,12 +75,6 @@ jobs:
         shell: bash
         run: composer require --no-update --no-interaction --dev "nikic/php-parser:^4"
 
-      - name: Updgrade symfony/translation
-        if: matrix.php >= 8.4
-        shell: bash
-        run: composer require --no-update --no-interaction "symfony/translation:^5.4.35||^6.3.12||^7.0.3" "symfony/contracts:^2.5.3||>=3.4.2" "sebastian/exporter:>5.1.2"
-        # https://github.com/symfony/symfony/commit/f4118e110a46de3ffb799e7d79bf15128d1646ea
-
       - name: Install dependencies
         uses: nick-fields/retry@v3
         if: steps.composer-cache.outputs.cache-hit != 'true'
diff --git a/tests/Carbon/DiffTest.php b/tests/Carbon/DiffTest.php
index f43c48ea..3a4893fe 100644
--- a/tests/Carbon/DiffTest.php
+++ b/tests/Carbon/DiffTest.php
@@ -2170,19 +2170,6 @@ class DiffTest extends AbstractTestCase
         );
     }
 
-    public function testBigGapInDays()
-    {
-        $start = Carbon::parse('2030-11-03 01:24:22.848816', 'UTC');
-        $end = Carbon::parse('2027-05-02 01:24:22.848816', 'UTC');
-
-        $this->assertSame(-1281.0, $start->diffInDays($end));
-
-        $start = Carbon::parse('2030-11-03 01:24:22.848816', 'America/Toronto');
-        $end = Carbon::parse('2027-05-02 01:24:22.848816', 'America/Toronto');
-
-        $this->assertSame(-1281.0, $start->diffInDays($end));
-    }
-
     public function testAFormat()
     {
         $past = new Carbon('-3 Days');
diff --git a/tests/Carbon/IsTest.php b/tests/Carbon/IsTest.php
index 64db0780..e47a514d 100644
--- a/tests/Carbon/IsTest.php
+++ b/tests/Carbon/IsTest.php
@@ -908,9 +908,6 @@ class IsTest extends AbstractTestCase
         $this->assertFalse(Carbon::hasFormat('1975-05-01', 'Y-*-d'));
 
         $this->assertTrue(Carbon::hasFormat('2012-12-04 22:59.32130', 'Y-m-d H:s.vi'));
-
-        // New Zealand Daylight time
-        $this->assertTrue(Carbon::hasFormat('2024-03-02T00:00:00+13:00', 'Y-m-d\TH:i:sP'));
     }
 
     public function testHasFormatWithModifiers()
@@ -1035,6 +1032,9 @@ class IsTest extends AbstractTestCase
         $this->assertTrue(Carbon::parse('2019-06-02 12:23:45')->is('Sunday'));
         $this->assertFalse(Carbon::parse('2019-06-02 12:23:45')->is('Monday'));
         $this->assertTrue(Carbon::parse('2019-06-02 12:23:45')->is('June'));
+        $this->assertTrue(Carbon::parse('2019-05-31 12:23:45')->is('May'));
+        $this->assertTrue(Carbon::parse('2019-05-31 12:23:45')->is('mAy'));
+        $this->assertFalse(Carbon::parse('2019-05-31 12:23:45')->is('April'));
         $this->assertFalse(Carbon::parse('2019-06-02 12:23:45')->is('May'));
         $this->assertTrue(Carbon::parse('2019-06-02 12:23:45')->is('12:23'));
         $this->assertFalse(Carbon::parse('2019-06-02 12:23:45')->is('12:26'));
diff --git a/tests/Carbon/SettersTest.php b/tests/Carbon/SettersTest.php
index 8df313e5..aacb12f7 100644
--- a/tests/Carbon/SettersTest.php
+++ b/tests/Carbon/SettersTest.php
@@ -336,12 +336,7 @@ class SettersTest extends AbstractTestCase
         $d->timestamp = 1600887164.88952298;
         $this->assertSame('2020-09-23 14:52:44.889523', $d->format('Y-m-d H:i:s.u'));
 
-        $d->setTimestamp(
-            // See https://github.com/php/php-src/issues/14332
-            PHP_VERSION < 8.4
-                ? 1599828571.23561248
-                : 1599828571.2356121,
-        );
+        $d->setTimestamp(1599828571.23561248);
         $this->assertSame('2020-09-11 08:49:31.235612', $d->format('Y-m-d H:i:s.u'));
 
         $d->timestamp = '0.88951247 1600887164';
@@ -917,21 +912,6 @@ class SettersTest extends AbstractTestCase
                 continue;
             }
 
-            if ($valueUnit === 'day') {
-                $dateInterval = $date->diffAsDateInterval($original);
-                $days = $dateInterval->days;
-
-                if ($days !== false) {
-                    $days *= $dateInterval->invert ? -1 : 1;
-
-                    if ($value === $days) {
-                        $results['current']++;
-
-                        continue;
-                    }
-                }
-            }
-
             if ($date->$valueUnit === $start->$valueUnit) {
                 $results['start']++;
 
diff --git a/tests/CarbonPeriod/CreateTest.php b/tests/CarbonPeriod/CreateTest.php
index c71c94a5..a7ab7550 100644
--- a/tests/CarbonPeriod/CreateTest.php
+++ b/tests/CarbonPeriod/CreateTest.php
@@ -898,20 +898,4 @@ class CreateTest extends AbstractTestCase
             $period->end?->format('Y-m-d'),
         ]);
     }
-
-    public function testSlashFormat()
-    {
-        $periodClass = static::$periodClass;
-        $period = $periodClass::create('2024-09-01/3 days/2024-09-30');
-
-        $this->assertSame('+3', $period->interval->format('%R%d'));
-        $this->assertSame('3 days', $period->dateInterval->forHumans());
-        $this->assertSame([
-            '2024-09-01',
-            '2024-09-30',
-        ], [
-            $period->start->format('Y-m-d'),
-            $period->end->format('Y-m-d'),
-        ]);
-    }
 }
diff --git a/tests/CarbonPeriod/SettersTest.php b/tests/CarbonPeriod/SettersTest.php
index 80a03e5a..ec8d6b6f 100644
--- a/tests/CarbonPeriod/SettersTest.php
+++ b/tests/CarbonPeriod/SettersTest.php
@@ -118,10 +118,8 @@ class SettersTest extends AbstractTestCase
         $this->assertSame(Carbon::class, $period->getDateClass());
         $this->assertInstanceOf(Carbon::class, $period->toArray()[0]);
 
-        if (PHP_VERSION < 8.4) {
-            $period = $period->setDateClass(AbstractCarbon::class);
-            $this->assertSame(AbstractCarbon::class, $period->getDateClass());
-        }
+        $period = $period->setDateClass(AbstractCarbon::class);
+        $this->assertSame(AbstractCarbon::class, $period->getDateClass());
     }
 
     public function testSetDateClassInvalidArgumentException()
diff --git a/tests/PHPStan/FeaturesTest.php b/tests/PHPStan/FeaturesTest.php
index cc1c2ccd..dccee798 100644
--- a/tests/PHPStan/FeaturesTest.php
+++ b/tests/PHPStan/FeaturesTest.php
@@ -13,11 +13,9 @@ declare(strict_types=1);
 
 namespace Tests\PHPStan;
 
-use PHPUnit\Framework\Attributes\RequiresPhp;
 use RuntimeException;
 use Tests\AbstractTestCase;
 
-#[RequiresPhp('<8.4')]
 class FeaturesTest extends AbstractTestCase
 {
     /**
diff --git a/tests/PHPStan/MacroExtensionTest.php b/tests/PHPStan/MacroExtensionTest.php
index 6230c37e..8e4ce719 100644
--- a/tests/PHPStan/MacroExtensionTest.php
+++ b/tests/PHPStan/MacroExtensionTest.php
@@ -19,12 +19,10 @@ use Carbon\CarbonInterval;
 use Carbon\PHPStan\MacroScanner;
 use PHPStan\Reflection\ClassReflection;
 use PHPStan\Reflection\ReflectionProvider;
-use PHPUnit\Framework\Attributes\RequiresPhp;
 use PHPUnit\Framework\Attributes\RequiresPhpunit;
 use Tests\AbstractTestCase;
 
 #[RequiresPhpunit('<11')]
-#[RequiresPhp('<8.4')]
 class MacroExtensionTest extends AbstractTestCase
 {
     private function mockReflectionProvider()
diff --git a/tests/PHPStan/MacroTest.php b/tests/PHPStan/MacroTest.php
index 839cfda4..5a7a90f4 100644
--- a/tests/PHPStan/MacroTest.php
+++ b/tests/PHPStan/MacroTest.php
@@ -16,13 +16,11 @@ namespace Tests\PHPStan;
 use Carbon\Carbon;
 use Carbon\CarbonImmutable;
 use Carbon\PHPStan\Macro;
-use PHPUnit\Framework\Attributes\RequiresPhp;
 use PHPUnit\Framework\Attributes\RequiresPhpunit;
 use ReflectionClass;
 use Tests\AbstractTestCase;
 
 #[RequiresPhpunit('<11')]
-#[RequiresPhp('<8.4')]
 class MacroTest extends AbstractTestCase
 {
     public function testIsStatic()