Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Calculate Leap Year
Message
 
To
13/01/2000 12:59:05
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00317731
Message ID:
00317776
Views:
14
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform