Skip to content

Instantly share code, notes, and snippets.

@krisleech
Created December 13, 2013 10:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save krisleech/7942575 to your computer and use it in GitHub Desktop.
Save krisleech/7942575 to your computer and use it in GitHub Desktop.
There has to be a better way?
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