Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Coding puzzle 2
Message
From
04/06/2002 13:53:06
Mike Yearwood
Toronto, Ontario, Canada
 
 
To
04/06/2002 13:39:33
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
00664570
Message ID:
00664627
Views:
27
You mean if the child isn't 1 yet? I'd call that 0 years ;) My code was *designed* that way ;)

>Mike,
>
>This method fails for young people on their birthday. There may be other scenarios that will give incorrect results also...
>
>And yes, the spec itself was a little vague :)
>
>>LPARAMETERS tdB,tdD
>>RETURN INT((tdD-tdB)/365.25)
>>
>>This doesn't check if the birthdate is lower than the date specified in tdD. If doesn't check if the parameters are date or datetime. You need to make SPEC ifications not SPECK ification <g>.
>>
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform