Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Calculate Leap Year
Message
 
À
13/01/2000 12:59:05
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00317731
Message ID:
00317776
Vues:
12
IF the year is divisible by 4---->1) Yes
...IF the year is divisible by 100---->2) No
......IF the year is divisible by 400
.........It is a leap year
......ELSE
.........It is not a leap year
......ENDIF
...ELSE
......It is a leap year---->3) 1996 is a leap year.
...ENDIF
ELSE
...It is not a leap year
ENDIF


It works. It is how it is done.

Joe


>Joseph,
>
>This will not work. 1996 was a leap year but does not match the structure below.
>There have been multiple treads on the calculation of a leap year. Search for Leap Year and you should have some good examples.
>
>HTH
>
>Jeff Whitaker
>
>>Yeah...
>>
>>IF the year is divisible by 4
>>...IF the year is divisible by 100
>>......IF the year is divisible by 400
>>.........It is a leap year
>>......ELSE
>>.........It is not a leap year
>>......ENDIF
>>...ELSE
>>......It is a leap year
>>...ENDIF
>>ELSE
>>...It is not a leap year
>>ENDIF
>>
>>
>>
>>>I need a function to calculate leap years. Any suggestions? Thanks,
>>>
>>>Raef
Joseph C. Kempel
Systems Analyst/Programmer
JNC
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform