Compare dates Function

Tested with days and hours variables separately