Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
After January 1st
Message
General information
Forum:
Visual FoxPro
Category:
FoxPro 2.x
Miscellaneous
Thread ID:
00308678
Message ID:
00312317
Views:
56
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
Or This...
Leapyear = MOD(nYear,4)=0 AND (MOD(nYear,100) # 0 OR MOD(nYear,400)=0)
I would also vote for the former, although they do both give the same result.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform