I have a DailyQuote model in my rails application which has a date and price for a stock. Data in the database has been captured for this model
class Time def is_weekend? [0, 6, 7].include?(wday) end end time = Time.new puts "Current Time : " + time.inspect puts time.is_weekend?