Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: a8f967cd42c5add143939660b7cd928375182377 https://github.com/WebKit/WebKit/commit/a8f967cd42c5add143939660b7cd928375182377 Author: Yusuke Suzuki <ysuz...@apple.com> Date: 2022-11-16 (Wed, 16 Nov 2022)
Changed paths: M JSTests/complex.yaml A JSTests/complex/date-parse-with-narrow-no-break-space.js M Source/JavaScriptCore/runtime/JSDateMath.cpp M Source/WTF/wtf/unicode/CharacterNames.h Log Message: ----------- [JSC] Date parse should accept narrow-no-break-space https://bugs.webkit.org/show_bug.cgi?id=247986 rdar://102427399 Reviewed by Alexey Shvayka. After ICU 72, CLDR generates narrow-no-break-space for date time output. So, `new Date().toLocaleString('en-US')` starts generating a string including narrow-no-break-space instead of simple spaces. However since code in the wild assumes `new Date(new Date().toLocaleString('en-US'))` works, we need to maintain the ability to parse string including narrowNoBreakSpaces. Rough consensus among implementaters (V8, SpiderMonkey, and us) is replacing narrowNoBreakSpaces with simple spaces before parsing. * JSTests/complex.yaml: * JSTests/complex/date-parse-with-narrow-no-break-space.js: Added. (shouldBe): * Source/JavaScriptCore/runtime/JSDateMath.cpp: (JSC::DateCache::parseDate): * Source/WTF/wtf/unicode/CharacterNames.h: Canonical link: https://commits.webkit.org/256754@main _______________________________________________ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes