extracted the creation of dates in his method.

Preparing the creation of a Class to create the output. Separating the concern of outputting to create the data.