i have a code that erroneously produces it and i am thinking that there must be a better way to check for time >9.30 am and time <4 pm any ideas is highly appreicated.<
def check_time(t=Time.now) early = Time.new(t.year, t.month, t.day, 9, 30, 0, t.utc_offset) late = Time.new(t.year, t.month, t.day, 16, 0, 0, t.utc_offset) t.between?(early, late) end