Skip to content

Instantly share code, notes, and snippets.

@sapereau83
Created November 2, 2014 15:39
Show Gist options
  • Save sapereau83/b78404aacf5fd7c6983b to your computer and use it in GitHub Desktop.
Save sapereau83/b78404aacf5fd7c6983b to your computer and use it in GitHub Desktop.
Date Helpers
class Time
def self.yesterday
Time.now - (24 * 60 * 60)
end
def self.tomorrow
Time.now + (24 * 60 * 60)
end
def self.day_after_tomorrow
Time.now + (2 * 24 * 60 * 60)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment