Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Making CTOD() work in Europe
Message
From
17/11/2018 09:26:20
 
 
To
17/11/2018 07:29:48
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01663465
Message ID:
01663490
Views:
44
>>Good point, and now for the lazy ones
>>
>>Create the function my_ctod as above
>>
>>Now use your global include file and add
>>
>>#DEFINE CTOD my_ctod
>>
>>
>>Precompiler replaces CTOD with my_ctod. Done. No replace anywhere else.
>
>Hi Lutz.
>
>Your solution might work, but my argument it would be confusing to a future maintenance developer who sees input to what seems like CTOD() using parameters inconsistent with the expectations of a British date.
>
>I would choose to manually replace each instance (or programmatically do so in this case) to keep it clear.
>

I agree completely with Rick in this regard. Those backdoor tricks only increase technical debt and will for sure bite you back at one time.

Even better try to upgrade the affected data with non-ambigous values if possible.

"Always code for the maintener:
Always code as if the person who ends up maintaining your code is a violent psychopath who knows where you live."

http://wiki.c2.com/?CodeForTheMaintainer
Christian Isberner
Software Consultant
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform