A date calculator in Ruby