Here is a simple monkeypatch (duckpunch, donkeykick, squirrelbite, etc) to the Date class that easily allows us to calculate the number of weekdays between two dates. I can’t believe that this functionality doesn’t exist in the standard lib, but I’m normally the last person to mess with Date/Time calculations because they are absolute evil.
Drop this sucker into a file named “date.rb” in your Rails app’s config/initializers directory and restart.













