Skip to content

Instantly share code, notes, and snippets.

@sunaku
Forked from luckyruby/gist:1956339
Created March 2, 2012 07:07
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 sunaku/1956368 to your computer and use it in GitHub Desktop.
Save sunaku/1956368 to your computer and use it in GitHub Desktop.
def self.valid_time?(time)
(0 .. 2359).include? Integer(time)
rescue ArgumentError # invalid integer
false
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment