Given a date, how do I find the nearest Monday in Rails?
I know I can do things like:
Date.tomorrow Date.today
Is there something like Date.nearest :mond
Assuming you want both directions: Date.today.beginning_of_week + 7*(Date.today.wday/5)
Date.today.beginning_of_week + 7*(Date.today.wday/5)