Sha256: bfb54a5558f8422e4fed83eb6aff69390816b8dd3cccd9f9f7a4f86a3a896103

Contents?: true

Size: 1.05 KB

Versions: 87

Compression:

Stored size: 1.05 KB

Contents

# Leap

Given a year, report if it is a leap year.

The tricky thing here is that a leap year in the Gregorian calendar occurs:

```plain
on every year that is evenly divisible by 4
  except every year that is evenly divisible by 100
    unless the year is also evenly divisible by 400
```

For example, 1997 is not a leap year, but 1996 is.  1900 is not a leap
year, but 2000 is.

If your language provides a method in the standard library that does
this look-up, pretend it doesn't exist and implement it yourself.

## Notes

Though our exercise adopts some very simple rules, there is more to
learn!

For a delightful, four minute explanation of the whole leap year
phenomenon, go watch [this youtube video][video].

[video]: http://www.youtube.com/watch?v=xX96xng7sAE

Run the tests with:

    bats whatever_test.sh

## Source

JavaRanch Cattle Drive, exercise 3 [http://www.javaranch.com/leap.jsp](http://www.javaranch.com/leap.jsp)

## Submitting Incomplete Solutions
It's possible to submit an incomplete solution so you can see how others have completed the exercise.

Version data entries

87 entries across 87 versions & 1 rubygems

Version Path
trackler-2.2.1.85 tracks/bash/exercises/leap/README.md
trackler-2.2.1.84 tracks/bash/exercises/leap/README.md
trackler-2.2.1.83 tracks/bash/exercises/leap/README.md
trackler-2.2.1.82 tracks/bash/exercises/leap/README.md
trackler-2.2.1.81 tracks/bash/exercises/leap/README.md
trackler-2.2.1.80 tracks/bash/exercises/leap/README.md
trackler-2.2.1.79 tracks/bash/exercises/leap/README.md
trackler-2.2.1.78 tracks/bash/exercises/leap/README.md
trackler-2.2.1.77 tracks/bash/exercises/leap/README.md
trackler-2.2.1.76 tracks/bash/exercises/leap/README.md
trackler-2.2.1.75 tracks/bash/exercises/leap/README.md
trackler-2.2.1.74 tracks/bash/exercises/leap/README.md
trackler-2.2.1.73 tracks/bash/exercises/leap/README.md
trackler-2.2.1.72 tracks/bash/exercises/leap/README.md
trackler-2.2.1.71 tracks/bash/exercises/leap/README.md
trackler-2.2.1.70 tracks/bash/exercises/leap/README.md
trackler-2.2.1.69 tracks/bash/exercises/leap/README.md
trackler-2.2.1.68 tracks/bash/exercises/leap/README.md
trackler-2.2.1.67 tracks/bash/exercises/leap/README.md
trackler-2.2.1.66 tracks/bash/exercises/leap/README.md