-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Class "IntlDateFormatter" not found -php 8.2 #24
Comments
You should ensure that php-intl is installed. Run |
Yes - but intl is nowadays a standard - except under Xampp, where You sholud activate intl and zip in the php.ini |
The INTL library can not handle common sprintf like: strftime("The rain in Spain falls on the %M'th day of %Y\n"); Why I say they messed up. |
In PHP 8.1 and later versions, you can use the DateTimeImmutable class to achieve similar functionality as the strftime() function.
*The strftime function was used to format local time or date according to locale settings, but it has been replaced by the DateTimeInterface::format method. The DateTimeInterface::format method is more powerful and flexible than strftime, and it allows for more customization and control over the formatting of dates and times. *An alternative is the IntlDateFormatter::format method instead.
|
Under php 8.2 , a click at the revision-history-button gives
Class "IntlDateFormatter" not found - in ....\thirdparty\time\strftime.php on line: 61 (54) -
and add behind the first line
namespace PHP81_BC;
use DateTime;
use DateTimeZone;
use DateTimeInterface;
use Exception;
use IntlDateFormatter;
use IntlGregorianCalendar;
use InvalidArgumentException;
The text was updated successfully, but these errors were encountered: