Topic: advanced date help
I need to figure out how to :
A - change the year value of a date to be 1 year ahead of now if the date and month has passed. So for example I have a day and a month, say March 11th. If today is past march 11 in the calendar year I need to create a date of march 11, 2008, if its before march 11, then create a date of march 11, 2007.
I got close with Time, but Time.today + 1.year appears to just adds 365 days which could be a differnt date.
B - to create a date for the N th weekday in a given month. So for example I want to create the date for MLK holiday, which is 3rd monday in january, for any given year.