-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cljs-time.extend Equiv and cljs-time.core/= return different results #138
Comments
Also, note that the |
I don't remember the exact reason that cljs-time/src/cljs_time/extend.cljs Line 39 in 77649a4
true anymore.
The fact that the functionality is different is not intentional, most likely I forgot Not sure that a subtle behaviour change at this point is a great idea though. |
I see. Another thing I noticed is that cljs.user> (binding [t/*ms-fn* (constantly (t/*ms-fn*))]
(let [t1 (t/now)
t2 (t/time-now)]
[(t/equal? t1 t2)
(t/equal? t2 t1)]))
[true true]
cljs.user> (binding [t/*ms-fn* (constantly (t/*ms-fn*))]
(let [t1 (t/now)
t2 (t/time-now)]
[(= t1 t2)
(= t2 t1)]))
[false false]
Also, is there any particular reason that |
Hi, thanks for all the work done on this excellent library!
I'm wondering if there's a reason that the
Equiv
implementation incljs-time.extend
andcljs-time.core/=
return different results?Looking at the implementation in
IEquiv
, it seems the behaviour is conditional on the types (in the example above,(instance? goog.date.UtcDateTime other)
on L51 would returnfalse
), whereascljs-time.core/=
coerces everything to a timestamp and compares that.Is this intentional?
The text was updated successfully, but these errors were encountered: