Running below example from the documentation returns false for me (other examples in this page have the same issue). Is it a bug?
$fmt = new IntlDateFormatter(
'en_US',
IntlDateFormatter::FULL,
IntlDateFormatter::FULL,
'America/Los_Angeles',
IntlDateFormatter::GREGORIAN
);
echo 'First parsed output is ' . $fmt->parse('Wednesday, December 20, 1989 4:00:00 PM PT');
echo $fmt->getErrorMessage(); // return: U_PARSE_ERROR
It seems parse
method need format
parameter of IntlDateFormatter
constructor.