Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Making CTOD() work in Europe
Message
 
 
À
17/11/2018 07:29:48
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01663465
Message ID:
01663490
Vues:
45
>>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform