The problem with that function is that it will check if both the dates and the times of the given date objects are equal, but we need to only check if the date is equal here (since the times will probably be very different, but we don't care about that), that's why I named the function '_sameDay' instead of '_sameDate' for example.

I looked for an existing function that would do just the date check but couldn't find one, so I had to build it myself.