Good, except the first divisor should be 4 < g >
do case
case mod(nYear, 400) = 0
lLeapYear = .t.
case mod(nYear, 100) = 0
lLeapYear = .f.
case mod(nYear, 4) = 0
lLeapYear = .t.
otherwise
lLeapYear = .f.
endcase
Cheers,
Andrew
>Hold the phone... I think I am missing something...
>
>Maybe it is this:
>
>If a year is divisble by 10, it can be a leap year
>If that same year is divisible by 100, it is not a leap year...
>However, if that same year is then divisble by 400, it is then a leap year...
>
>Yea... that is the ticket...
>
>It makes for an interesting math equation....
>
>
>
>
>>Jimmy...
>>
>>What is the rule???
>>The year has to be divisible by 10 and 400...right...to be a leap year..
>>
>>lLeapYear = Mod(nyear,0) = 0 And Mod(nyear,400) = 0
>>
>>Every 400 years, we have to count an extra day.... Go figure...
If we were to introduce Visual FoxBase+, would we be able to work from the dotNet Prompt?
From Top 22 Developer Responses to defects in Software
2. "It’s not a bug, it’s a feature."
1. "I thought I fixed that."
All my FoxTalk and other articles are available on my
web site.
Unless specifically identified otherwise, anthing posted here is purely my opinion and may or may not reflect the policies or practices of Microsoft.