Skip to content

Instantly share code, notes, and snippets.

@zulhfreelancer
Created October 5, 2015 03:09
Show Gist options
  • Save zulhfreelancer/e51075a472bef85fc771 to your computer and use it in GitHub Desktop.
Save zulhfreelancer/e51075a472bef85fc771 to your computer and use it in GitHub Desktop.
Rails: check day and noon
def a
  if Time.zone.now.monday?
    if Time.zone.now == Time.zone.now.noon
      puts "this is the right time"
    else
      puts "sorry, this is not the time"
    end
  else
    puts "sorry, not today man"
  end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment