date = Date.today tuesday = date.next_week(:tuesday)
``
returns the next week’s occurrence of Tuesday, relative to today(the date instance).
At times, this may not be the required result, e.g if today were a Monday, I might just need Tuesday, it would be convenient to have something like:
date = Date.today tuesday = date.next_tuesday
``
if date is Monday, tuesday should return tomorrow and not necessarily next week’s Tuesday as currently provided by next_week
This would be useful largely in scheduling applications