Refactored date calc into own method