Fix wrong number of returned days in from->to queries