class Date
  # return the lowercased day name in English of the date object eg: monday or friday etc
  def day_name
    Date::DAYNAMES[wday].downcase
  end
end

class Time
  def minute_of_day
    60 * hour + min
  end
end
