Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Need function to find Monday by Week No
Message
From
24/09/2005 16:08:08
 
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9
Miscellaneous
Thread ID:
01052733
Message ID:
01052787
Views:
7
>>
>>Dmitry,
>>
>>First of all, don't be embarrassed to show the code. No one's making judgments.
>>
>>Unfortunately, a lot of people equate speed with the number of lines of code. Sometimes it's correct. Sometimes not.
>>
>>Before responding, I'd ask two questions. What are the circumstances under which this function is being called? Are we talking about milliseconds or minutes with your function?
>>
>>Remember, it's easy to offer advice in a vacuum. However, without specific details, it's hard to come up with an appropriate solution.
>
>George,
>
>Here is what I need to use this function for. I have 52 labels on a form, each one has Caption with number corresponding to the week number. I want the user to be able to click on any label and in Mouse Up method I would display (in WAIT) the calendar date corresponding to the Monday of the clicked week number.

Have you considered that there are years with 53 weeks?!


>I wanted the speed because (I think) that the user will be frustrated if they have to wait (even 2 seconds) after clicking on the label. So far, in my tests, on my PC, it seems to be very fast, not even a second.

Not even a second? The function should be less than 10 milliseconds! :)
Groet,
Peter de Valença

Constructive frustration is the breeding ground of genius.
If there’s no willingness to moderate for the sake of good debate, then I have no willingness to debate at all.
Let's develop superb standards that will end the holy wars.
"There are three types of people: Alphas and Betas", said the beta decisively.
If you find this message rude or offensive or stupid, please take a step away from the keyboard and try to think calmly about an eventual a possible alternative explanation of my message.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform