This Ruby coding exercise walks through how to calculate leap years in Ruby, specifically how to list out all of the leap years in the 20th century.
Find and store all of the leap years in the 20th century.
Given an array of all of the years in the 20th century:
years = (1900..1999).to_a
Find and store all of the leap years from the 20th century and store it in an array called
Real World Usage
Working with dates is common in Ruby development. This exercise will specifically let you compare building a date algorithm from scratch compared with leveraging the built in
date library provided by Ruby.
Can be found on the solutions branch on github.