Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Making CTOD() work in Europe
Message
 
 
To
18/11/2018 12:23:56
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01663465
Message ID:
01663517
Views:
36
>>Hi,
>>
>>As I go through my program, I see many places where I convert a string to date, using CTOD(), hard-coded with MM/DD/YYYY. But if the date is (for example), British ("DD/MM/YYYY") it won't work.
>>
>>How do you suggest I change all places that use CTOD() from hard-coded use of American date system to another?
>>
>>TIA
>
>Aside from bits you mention regarding date and time and numeric formats (e.g. decimal point and comma), there's also the bit about paper size that will probably come up (e.g. A4 is slightly narrower and taller than US letter size).
>You may also have seen my occasional comments about some of the stuff you'd have to be careful about when dealing with East Asian languages such as Chinese, Japanese and Korean -- and how *each* may have two or three major variants in the double-byte encodings. You may have seen my occasion reminder to avoid string literals containing characters within upper ASCII range (this is because many of the prefix and "shift" characters in double-byte character set tend to be in this range).
>Other changes you may have to make in your code may also involve different formatting for mailing address (e.g. commonly you may restrict input to digits only for zip code, but postal codes can be alphanumeric). Phone numbers could be a pain -- the formats may not only vary by country, but also region within country as well. I do recall one "hack" to reduce storage space for phone numbers was to store it in a 32-bit binary value (it did involve swapping the order of two of the digits -- it is based on the assumption that the middle digit of the area code was always a zero or one) -- which promptly broke in the 1990s.

I cannot possibly worry about the paper size (right now) since my plate is full of "fixing" the dates, numbers, and currency. I will deal with it, if I ever get a European customer.
As far as East Asian languages; I would never attempt to sell my app to those countries unless they pay big money and I can ask you to be a sub-contractor. I am not joking; dealing with that market would require a major input.
Phone numbers are also not a big concern right now (simply because of lack of time).
Thank you for your input.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Previous
Reply
Map
View

Click here to load this message in the networking platform