Moved dates functions to utils