Leap Year Decision Table


Conditions 1 2 3 4 5 6 7 8
1. Divisible by 4 Y Y Y Y N N N N
2. Divisible by 100 Y Y N N Y Y N N
3. Divisible by 400 Y N Y N Y N Y N
Actions                
1. Leap Year X     X        
2. Not Leap Year   X           X
3. Impossible     X   X X X  

Applications which manipulate time and date values may need to include an algorithm to decide whether a given year is a Leap Year.