You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The space character immediately preceding "AM"/"PM" in the return value is a Unicode "NARROW NO-BREAK SPACE" (8239) character, instead of the correct "SPACE" (32) character.
Affects Date.prototype.toLocaleTimeString and Date.prototype.toLocaleString.
Node.js version
v18.13.0
Example code
letlocaleString=newDate().toLocaleString();// e.g., "1/6/2023, 2:10:22 PM"letlastThreeChars=localeString.slice(-3);// e.g., " PM"lastThreeChars.charCodeAt(0);// 8239 (but should be 32)
Operating system
macOS 12.5.1 (21G83)
Scope
Runtime
Module and version
Not applicable.
emiliemarchand, centaurreader, square-li, e3dio, chuck-safarisop and 10 more