Skip to content

Instantly share code, notes, and snippets.

@trak3r
Created October 30, 2009 17:21
Show Gist options
  • Save trak3r/222547 to your computer and use it in GitHub Desktop.
Save trak3r/222547 to your computer and use it in GitHub Desktop.
def last_wednesday
today = Date.today
backup = ((4 + today.wday) % 7)
today - backup
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment