Created
July 25, 2011 01:14
-
-
Save potomak/1103349 to your computer and use it in GitHub Desktop.
Date != Time
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
logger.debug "Date.yesterday: #{Date.yesterday.inspect}" | |
logger.debug "date: #{date.inspect}" | |
logger.debug "date == Date.yesterday: #{date == Date.yesterday}" | |
logger.debug "date.to_date: #{date.to_date.inspect}" | |
logger.debug "date.to_date == Date.yesterday: #{date.to_date == Date.yesterday}" | |
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
Date.yesterday: Sun, 24 Jul 2011 | |
date: Sun Jul 24 00:00:00 +0200 2011 | |
date == Date.yesterday: false | |
date.to_date: Sun, 24 Jul 2011 | |
date.to_date == Date.yesterday: true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment