Refactor withinAllowedTime to use implicit class for DateTime