-
Notifications
You must be signed in to change notification settings - Fork 39
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
DateFormat.jm().parse() failing on String that previously worked. #637
Comments
Thanks for filing this issue! However, this is working as intended, as the CLDR data underlying this change indeed changed the space as you described. |
If that is the case, this update should have incremented the major version number because this is a breaking change. |
Agree this break a lot of test for me, also this change is in not listed in the changelog of the package, also, not knowing which space character is used is complicated to do tests and manually put that special character, even vscode highlights it like, I think think this is not a user friendly change (dev ux wise) . For others our team changed the |
See also this discussion in NodeJS - changes to formatting are not breaking as they are intended for humans, not machines. @jonbhanson Major version releases indicate changes in the API - the actual behavior of the formatting is updated regularly as part of the CLDR releases. I agree that this should have been communicated more clearly though. @rurickdev You are right about the missing changelog entry, thank you for pointing that out. I filed #641 to address this. The white space change was decided on in a long process by language experts and is rolled out to all languages, not just Dart. |
Previously,
DateFormat.jm().parse("12:30 PM")
worked fine. However, in version 0.18.1 of intl, this now throws aFormatException
. The reason is because "12:30 PM" has a space between the time and the PM, andintl
is comparing this space against the space in thejm
pattern. This commit changed the space character in thejm
pattern to a Narrow No-Break Space so the equality check is nowfalse
, triggering theFormatException
.The text was updated successfully, but these errors were encountered: