How can I implement IntlDateFormatter
in Symfony 4.4.
With reference to https://symfony.com/doc/current/components/intl.html I have installed symfony/intl
Now when I use it in my code:
use Symfony\Component\Intl\DateFormatter\IntlDateFormatter;
$formatter = new IntlDateFormatter(
"de-DE",
IntlDateFormatter::FULL,
IntlDateFormatter::NONE,
"Europe/Berlin",
IntlDateFormatter::GREGORIAN,
"MMMM YYYY"
);
I am getting Cannot instantiate abstract class Symfony\Component\Intl\DateFormatter\IntlDateFormatter
. I know abstract class can not be instantiate. But I am not sure how to implement.