Created
July 18, 2013 14:07
-
-
Save fuksito/6029615 to your computer and use it in GitHub Desktop.
DateTime bug
This file contains hidden or 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
> "2011-01-01".to_datetime.strftime("%Y%U") | |
=> "201100" | |
> DateTime.strptime("201100", "%Y%U") | |
ArgumentError: invalid date | |
> DateTime.strptime("201101", "%Y%U") | |
=> Sun, 02 Jan 2011 00:00:00 +0000 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment