Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Any function for check if its a leap year ?
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00756383
Message ID:
00756444
Views:
11
>George
>
>
lIsLeapYr = (nyear % 4 = 0) AND (nyear % 400 = 0)
>
>it works for 2000, but not for 2004. why ?
>
>txs

I was writing my last while I had one foot out the door. So from home
IsLeapYr = (nYear % 4 = 0) AND (NOT (nYear % 100 = 0) OR (nYear % 400 = 0))
I think should do the trick.

I'm having so much trouble with truth tables to-day, I'm pronouncing them "tooth tables".< bg >
George

Ubi caritas et amor, deus ibi est
Previous
Reply
Map
View

Click here to load this message in the networking platform