date = $dateInMonth ?? new \DateTime(); } public function generateReplace(string $locale): string { $formatter = new \IntlDateFormatter($locale, \IntlDateFormatter::LONG, \IntlDateFormatter::LONG); $formatter->setPattern('LLLL yyyy'); return $formatter->format($this->date); } }