I have a chunk of code where I need to see if two dates are on the same day. What I have found is that if one date is after 7pm, the “isSameDay” function from date-fns returns a false.
If I create two javascript date objects for the two dates I am comparing and compare the two with getDay, getMonth, and getFullYear, it fails as well.
I believe that there is some time zone issue going on and I expected date-fns functions to account for time zone – or at least allow for it. The problem is that if this is the case, I don’t see it in the documentation.