Return to Snippet

Revision: 47994
at June 21, 2011 19:04 by stancox


Initial Code
d1 = Date.new( Time.now.year, Time.now.month, 1) #first day of month\period
d2 = Date.new( Time.now.year, Time.now.month, -1) #end day of month\period
wdays = [0,6] #weekend days by numbers on week
weekdays = (d1..d2).reject { |d| wdays.include? d.wday} #Day.wday number day in week

Initial URL

                                

Initial Description

                                

Initial Title
count working days in month

Initial Tags

                                

Initial Language
Ruby