Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
What is best way to calculate age
Message
From
21/09/2006 13:00:37
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01155605
Message ID:
01156078
Views:
35
>>>Fabio, why do you expect 17 days when 15 is correct
>>>1988,2,29 is the last day in february in 1988 + 15 days yields the 14th
>>>
>>>Cetin is right, you are wrong!
>>>
>>>
>>>Peter
>>>
>>
>>
>>
>>Birth = {^1988/2/29}
>>* Age in {^1989/3/01} is: 1 years 0 months 1 day
>>
>>* Age in {^1989/2/28} is ?
>>* if age= 0 years 11 months and 30 days
>>* and age 1 year is not possible ( the person it doesn't have birthday)
>>
>>* then the possible choice is only:
>>* in {^1989/2/28} is : 1 years 0 months 0 days
>>
>>
>>result: the only common sense is
>>age=((years)+months)+days
>>today = ((birth+years)+months)+days
>>
>>and age's days are the last lived days
>
>Yes, that's correct and that's the definition used in Rick's class. Cetin's code returns 11 months 30 days.

Naomi,
I might also raise debates which one is correct:
Birth = {^1988/2/28}
I have other revisions of this code but I didn't even get to them and do not care with the correct solution, my point was your offending only. Thanks.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform