Make the unit tests pass for implementing the split at midnight function.