Leap Year, anyone? << Back



Take a look at the explanation of how to determine if a year is a leap year. The year 1700 is NOT a leap year (Divisible by 100, but not 400). Let's look at the sample code below. Luckily unless you have to deal with old dates, the next problematic date is probably gonna be Feb 29, 2100 (which I am sure I won't be alive).

Use UI
Date feb march
Move 02/28/1700 to feb
Move 03/01/1700 to march
showln (feb + 1) // it shows 02/29/1700. The correct date should be 03/01/1700
showln (march - feb) // it shows 2, which is supposed to be 1
Showln (march - 1) // it shows 02/29/1700. The correct date should be 02/28/1700
InKey FieldIndex





Free Web Hosting