I'm trying to use the IntlDateFormatter class to format date and time strings to local (Dutch) time formats. I use the following code that I copy-pasted from https://www.simonholywell.com/post/2015/07/international-php-dates-with-intl/ into my Main class:
$DateTime = new DateTime();
$IntlDateFormatter = new IntlDateFormatter(
'es_ES',
IntlDateFormatter::FULL,
IntlDateFormatter::FULL
);
echo $IntlDateFormatter->format($DateTime);
But I get the following errors:
Fatal error: Uncaught Error: Class 'IntlDateFormatter' not found in C:\Users\denni\PhpstormProjects\ACNOP OOP\Main.php on line 69
Error: Class 'IntlDateFormatter' not found in C:\Users\denni\PhpstormProjects\ACNOP OOP\Main.php on line 69
I already tried to uncomment the line ;extension=php_intl.dll
so that it becomes extension=php_intl.dll
, but that did not help.
What do I need to do?
I use PHPStorm, just in case if that is important
Thanks in advance.