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
today = Date.today
if today.saturday? || today.sunday?
puts "Today is a weekend!"
end
You can also do this for any other day of the week. Ruby is fantastic and offers a lot of cool methods like this. I suggest when you get stumped take a look at what's available to the class by running .methods
on it. So if you run Date.today.methods
you will see these available.