Fix bug when 30 days ago is in middle of month

The function last_30_days_imo_month algorithm was bad