Skip to content

Instantly share code, notes, and snippets.

@rubysolo
Forked from jimmybaker/gist:128717
Created June 12, 2009 15:53
Show Gist options
  • Save rubysolo/128718 to your computer and use it in GitHub Desktop.
Save rubysolo/128718 to your computer and use it in GitHub Desktop.
class Time
def is_after?(timestamp)
self.to_i - self.at_beginning_of_day.to_i > timestamp
end
def is_after_430_pm?
# 4:30 == 16:30
# 16*3600 (sec/hr)
#+30*60 (sec/min)
#=59400
is_after?(59400)
end
def is_after_5_pm?
is_after?(61200)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment