Skip to content

Instantly share code, notes, and snippets.

@janjiss
Created June 4, 2013 13:05
Show Gist options
  • Select an option

  • Save janjiss/5705749 to your computer and use it in GitHub Desktop.

Select an option

Save janjiss/5705749 to your computer and use it in GitHub Desktop.
Implementation of Time.nowish
class Time
def self.nowish
time = self.now
minute = time.min > 30 ? 30 : 00
"#{time.hour.to_s}:#{minute.to_s} ish"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment