Created
July 11, 2015 19:56
-
-
Save davelnewton/5d66db2b9d7b594e8212 to your computer and use it in GitHub Desktop.
Can't Dupe Date Issue
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
> 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