Rename by-date stats to by-month.
Rename variables to reflect that we are gathering data by month.
Update sub-command help to explain that stats are being collected by month.
Add option for setting date format.
Add test for date format and switch to using call_command in tests.
Factor out stats writing and date formatting.