If you need to quickly find out the number of weekdays (Monday to Friday) between to given dates, try this:
require 'date'
a = Date.parse "11.04.2014"
b = Date.parse "31.12.2014"
(a..b).count {|date| (1..5).include?(date.wday) }
Posted by Thomas Eisenbarth to makandra dev (2014-03-19 11:36)