我想要最简单或最简单的方法,它根据给定的时间返回布尔值(真/假)是在下午 3 点之后还是不考虑日期。
例如:-
def after_three_pm(time)
//some code here
end
time= Time.now # Tue Jul 26 11:17:27 +0530 2011 THEN
after_three_pm(time) # should return false
time= Time.now # Tue Jul 26 15:17:27 +0530 2011 THEN
after_three_pm(time) # should return true