Refactoring: Took date-functions into seperate file