Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
What is best way to calculate age
Message
 
 
À
21/09/2006 12:41:04
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
01155605
Message ID:
01156066
Vues:
34
>>>>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.
>
>sure, but Rick code is not correct

Then I gave up <g>
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform