Created
February 25, 2014 23:47
-
-
Save gberger/9220450 to your computer and use it in GitHub Desktop.
Time#to_date (Ruby monkey patch)
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
class Time | |
def to_date | |
Date.parse(self.to_s) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment