Calculate number of business days between two days

I need to calculate the number of business days between two dates. How can I pull that off using Ruby (or Rails...if there are Rails-specific helpers).

Likewise, I'd like to be able to add business days to a given date.

So if a date fell on a Thursday and I added 3 business days, it would return the next Tuesday.

20
задан Shpigford 26 October 2010 в 20:36
поделиться