Major changes to handle cross-day events