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. endcaseOr 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.