Hour constraints logic implemented