Skip to content

Instantly share code, notes, and snippets.

@mehdi-farsi
Created November 2, 2014 15:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mehdi-farsi/b78404aacf5fd7c6983b to your computer and use it in GitHub Desktop.
Save mehdi-farsi/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