Closed bardt closed 6 years ago
Sorry for my tardiness, I just tried to follow your ellie link and don't seem to get anything using elm-date-extra.
Without seeing the code example I think you might want to use startOfTime
http://package.elm-lang.org/packages/rluiten/elm-date-extra/latest/Date-Extra-TimeUnit#startOfTime
It will allow you clear any parts of your date you don't wish to have affect your comparison.
An example here: https://ellie-app.com/qbFnhQG4ba1/0
I mistakenly expected
Date.Extra.Compare
to compare just dates, regardless the time and time zone. As shown in the example above, if we have dates from different sources (like parsing a string and constructing a date by hand), this function will not work as expected.The supposed user workaround is reconstructing a date from fields before comparison, but I believe this logic should be somehow included in comparison functions themselves.