Created
February 15, 2012 15:33
-
-
Save joelr/1836722 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Not between 5:30pm Friday and 5:30pm Sunday | |
def support_available?(time_check = nil) | |
time_check ||= Time.now | |
!(time_check.wday == 6 || (time_check.wday == 5 && (time_check.hour > 17 || (time_check.hour == 17 && time_check.min >= 30))) || (time_check.wday == 0 && (time_check.hour < 17 || (time_check.hour == 17 && time_check.min <= 30)))) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment