Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require 'date'
- def print_workdays(d1, d2)
- d1 +=1 while (d1.wday == 0 or d1.wday==6)
- d1.step(d2, 1) do |date|
- puts "#{Date::MONTHNAMES[date.mon]} #{date.day}" if date.wday != 0 and date.wday != 6
- end
- end
Add Comment
Please, Sign In to add comment