CarbonInterface::JANUARY, self::February => CarbonInterface::FEBRUARY, self::March => CarbonInterface::MARCH, self::April => CarbonInterface::APRIL, self::May => CarbonInterface::MAY, self::June => CarbonInterface::JUNE, self::July => CarbonInterface::JULY, self::August => CarbonInterface::AUGUST, self::September => CarbonInterface::SEPTEMBER, self::October => CarbonInterface::OCTOBER, self::November => CarbonInterface::NOVEMBER, self::December => CarbonInterface::DECEMBER, }; } public static function current(): Month { return Month::from(Str::lower(Carbon::now()->englishMonth)); } public static function fromNameOrCurrent(string $name): Month { $month = Month::tryFrom($name); if ($month === null) { return Month::current(); } return $month; } }