implementation of branch check by date and tests