Weekday or not..

You can Use this ,

def weekday?
(1..5).include?(wday)
end

check ..

d = Date.today
=> Mon, 04 Oct 2010
d.weekday?
=> true
d = Date.today - 1
=> Sun, 03 Oct 2010
d.weekday?
=> false

Comments

Popular posts from this blog

Install Cpanm module error : No such file or directory opening compressed index

How to increase Elasticsearch Shard recovery Speed

Getting started with Python Flask application with MVC structure