-
Notifications
You must be signed in to change notification settings - Fork 301
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
System.Datetime.TryParse too forgiving in Javascript #3858
Comments
Would be happy to help out on this one myself. Seems like a good small starting issue. |
Hello, The place to investigate this is issue should be: Fable/src/fable-library-ts/Date.ts Lines 594 to 601 in 8f7ab69
More specifically, I believe this problem is going to be in the Fable/src/fable-library-ts/Date.ts Lines 509 to 582 in 8f7ab69
The easiest way to work on this issue, is to copy your reproduction code in Once, this is running you can edit the Tip If it helps in this F# amplifying session https://amplifyingfsharp.io/sessions/2023/12/15/ at around 27min I am showing how > it can be done for Python target. (similar logic applies for JavaScript). Add a new test to capture this edges case, you can add it to JavaScript, Rust, Python, etc. so it can be checked for the most number of target possible. |
Hey @MangelMaxime, thank you very much for the indepth tips and explanations. I will look into it! |
Description
Please provide a succinct description of your issue.
Repro code
https://fable.io/repl/#?code=DYUwLgBARgNAbhAvBAygTwM5hAWwHQAiAhtgCoCWOIepATmgApG0YgAUARAIIBCAwhABsHAJQBYAFCSADrXIA7MADN5EDgGMi8niCYsQAEwBcEAKSwIcIsACuIRKYDyHaJaA&html=Q&css=Q
Expected and actual results
"ABC 6" should not be parsed as a date. In DotNet and Python, as expected, the bool returned is
false
. In Javascript though, the bool is true and the number after the "ABC" is parsed as the month.Related information
4.19.3
The text was updated successfully, but these errors were encountered: