Refactoring: extracted format_days for testability