While adding test for T375530 I found that cost calculation
could be improved. Especially existence of unsused variable $dayOfThisMonth suggested that.
So, I changed the code to calculate price per day using current month
if diff in days does not overlap with the previous month.
I still think it should be simplified to use number 30 instead of the number of days in a month.