Skip to content

Instantly share code, notes, and snippets.

@davelnewton
Created July 11, 2015 19:56
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 davelnewton/5d66db2b9d7b594e8212 to your computer and use it in GitHub Desktop.
Save davelnewton/5d66db2b9d7b594e8212 to your computer and use it in GitHub Desktop.
Can't Dupe Date Issue
> yesterday = DateTime.yesterday()
=> Fri, 10 Jul 2015
> yesterday.beginning_of_week
=> Sun, 05 Jul 2015
> (yesterday.beginning_of_week - 1.days).beginning_of_week
=> Sun, 28 Jun 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment