Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Funcao idade
Message
De
19/09/2003 07:47:24
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00830405
Message ID:
00830607
Vues:
28
>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)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform