Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Date Math
Message
 
To
09/03/2004 10:22:23
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00884427
Message ID:
00884430
Views:
44
>Is there a simple way to manage leap year when doing calculations based on dates? The program I am working on processes records on an annual basis. Sometimes the records are terminated before the end of a full year and sometimes they are increased or decreased before a full year. Because of leap year some years have 364 days and others have 365. Does FoxPro have a built in way to deal with this, or is there an easy way to program for this anomaly?

Here's the logic. A year is a leap year if:

1. It's equally divisible by 4 and
2. It's not equally divisible by 100 or it is equally divisible by 400.

That's why 2000 was a leap year.
George

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

Click here to load this message in the networking platform