Keyboard

↓ ↑
move between the rows you can see
→
open a feature, then step into it
←
close a feature, or step out to the one above
Enter
go to the page in focus
Tab
the same rows, plus everything else on the page
/
search the whole report
m
open or close the navigation drawer
Esc
leave the search box, or close the drawer
?
this list

Each rule holds across eras

All 12 scenarios hold

The classic introductory example is the Gregorian leap year rules. The first rule below gives one example year per rule. The second uses value sets, and shows that each rule holds across eras.

A leap year is a year with an extra day, February 29. The extra day keeps the calendar year aligned with Earth's orbit around the Sun.

A normal year has 365 days. Earth takes about 365.2422 days to orbit the Sun. To account for that extra fraction, we add one day every four years. Years divisible by 100 are an exception: they are not leap years, unless they are also divisible by 400.

expected outcome broken scenario
ScenarioYearIs Leap Year?
Not divisible by 4
  • 1
  • 2001
  • 30001
No
Divisible by 4
  • 4
  • 2004
  • 30008
Yes
Divisible by 100 but not by 400
  • 100
  • 2100
  • 30300
No
Divisible by 400
  • 400
  • 2000
  • 30000
Yes