Modify the date format to YYYY-mm-01.

Match the mozilla/ichnaea/120 changes as done by @crankycoder and send the date as YYYY-mm-01 only (overwriting the day value).
Changes as requested by @cpeterso.

Moved the code to a separate private method, controllable during execution by the relevant piece of code, depending on context.