Refactors generate_a_month_to_print method.