check active dates common function

Merge the utils module. (This is for common functions that I am going to use over different parts of the program and different programs.)