Timex 3 compare not working properly for daily granualarity

Timex 3 compare function either has a bug or I am not using it properly, check this code I took from my application:

> a = ~U[2023-01-09 03:00:00Z]
> b = ~U[2023-01-09 22:09:22.257598Z]
> c = ~U[2023-01-10 03:00:00Z]
> d = ~U[2023-01-09 22:09:22.257598Z]
> Timex.compare(a, b, :days)
0 # which is expected, the days are the same
> Timex.compare(c, d, :days)
0 # should not be 0, the days are different 

Does anyone know what is going on?

iex(3)> Timex.diff(c, d, :days)
iex(4)> Timex.diff(c, d, :hours)

4 hours is less that one day. That’s why, I guess.

Ouch, that makes sense. I guessed it was comparing dates at the day level :thinking: