- Notifications
You must be signed in to change notification settings - Fork8k
Closed
Description
Description
This is kind of related to#9799
With theICU 72.1 update, it replaces a ascii space character with a narrow non-breaking space unicode character for intl space So something like
(newIntlDateFormatter('en_US', -1,3))->getPattern();
will returnh:mm\u202fa
instead ofh:mm a
.
When creating date strings based off that pattern with the NNBS character, and then passing intostrtotime
,strtotime
returns false.
With the ICU update, I think functions likestrtotime
should support parsing the NNBS character.
The following code:
<?php$pattern = (newIntlDateFormatter('en_US', -1,3))->getPattern();$timeString =date($pattern,date('now'));$timestamp =strtotime($timeString);
Resulted in this output:
false
But I expected this output instead:
a unix timestamp
PHP Version
8.2.8
Operating System
Redhat Enterprise 8.8