Finishes the sortDateForEachCustom function. WHEW.