>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