Skip to content

Instantly share code, notes, and snippets.

View joelr's full-sized avatar

Joel Richards joelr

View GitHub Profile
151341
160499
168617
1223
181622
1138
27725
37373
57440
1489
#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