Created
December 13, 2013 10:43
-
-
Save krisleech/7942575 to your computer and use it in GitHub Desktop.
There has to be a better way?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def anniversary_of(date) | |
this_year = Date.today.year | |
_date = Date.parse("#{date.day}-#{date.month}-#{this_year}") | |
if _date < Date.today | |
_date + 1.year | |
else | |
_date | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment