Open
Description
When one returns a time to working time, it would seem sensible that the time actually passes the .in_working_hours?
test in all cases.
However, if the time passed to return_to_working_time
was outside working hours to start with, then WorkingHours.return_to_working_time
will return a time that does not pass the .in_working_hours?
predicate (because it returns the exact closing time).
See for example:
2.2.2 :006 > Time.now.in_working_hours?
=> false
2.2.2 :007 > WorkingHours.return_to_working_time(Time.now).in_working_hours?
=> false
2.2.2 :008 > (WorkingHours.return_to_working_time(Time.now) - 1.second).in_working_hours?
=> true
Metadata
Metadata
Assignees
Labels
No labels