-
-
Notifications
You must be signed in to change notification settings - Fork 36
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
CToD returns wrong result with right spaces #1275
Comments
Robert, if you'd like I can research (how VO behaves in various related cases) and fix this (adjust it to to work the same in X#). Just please tell me know what did this 5881305 commit fix (but also caused this problem), so I will cover this as well. |
I created this change because of a problem that I saw in a customer code. The customer did this (date format MM/DD/YYYY) |
1 similar comment
I created this change because of a problem that I saw in a customer code. The customer did this (date format MM/DD/YYYY) |
OK, thanks, from what I see VO handles even this "correctly": CToD("01.02.1*2-$ @ 2023 ") and produces 01/02/2023, looks like it trims the string and then uses only the 4 last remaining characters from the year part, ignoring anything before those. Will research it a bit more and will try to make the X# implementation as close as possible to VO. Will then send @Serggio an updated dll to give it a test as well |
…ToC() when the year is specified last in the date format template. When that's not the case, VO has a different and an even stranger behavior, if it becomes necessary in the future, we will look into that, too.
Completely emulating VO's tremendously inconsistent behavior in all cases is simply impossible, so I added a special implementation only for the case where the year is specified last in the date format template. This makes this special (but most commonly used) case compatible enough (but still not 100%) to VO. In all other cases, the previous X# behavior is kept for now. That should be good enough for the reported issues, @Serggio can you please give this updated dll a try? |
It works fine! Thank you! |
…ToC() when the year is specified last in the date format template. When that's not the case, VO has a different and an even stranger behavior, if it becomes necessary in the future, we will look into that, too.
Consider this:
This issue is a regression: fails in X# 2.16.0.5 and works in 2.14 as expected. Such an untrimmed string often comes from edit controls where user may enter a two-digit year as a shorthand.
Perhaps, here is the reason:
The text was updated successfully, but these errors were encountered: