first attempt at functions in dates.rb