Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Funcao idade
Message
From
19/09/2003 07:47:24
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00830405
Message ID:
00830607
Views:
20
>Pessoal, as funções fornecidas, consideram anos bisextos ?

A que eu fornecí, sim.

Básicamente, a expressão resta, por exemplo:
 20030405
-19651123
... divide o resultado entre 10000, e saca a parte inteira.

Se restam os anos. Se o mes de arriba é menos, terá um ano menos. Se os meses são iguais, mas o día de arriba é menor, também, terá um ano menos.

Se no interim touvesse um Fevereiro 29, ou incluso um Fevereiro 30, não afeta o cálculo.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform