Discussion:
Support for java.time.Instant
Mathias Bogaert
2016-05-23 18:58:20 UTC
Permalink
Hi,

Is native support for java.time.Instant planned?

Thanks,

Mathias Bogaert
--
You received this message because you are subscribed to the Google Groups "Datomic" group.
To unsubscribe from this group and stop receiving emails from it, send an email to datomic+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Marshall Thompson
2016-06-01 13:41:56 UTC
Permalink
Hi Mathias,

We don't have anything planned for this in the short term, but I will
register your interest as a feature request.

-Marshall
Post by Mathias Bogaert
Hi,
Is native support for java.time.Instant planned?
Thanks,
Mathias Bogaert
--
You received this message because you are subscribed to the Google Groups "Datomic" group.
To unsubscribe from this group and stop receiving emails from it, send an email to datomic+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Peter Romfeld
2016-07-15 09:21:59 UTC
Permalink
Hi,

clojure.java.Date is just painful, using clj-time is quite nice but
sometime you dont want to add additional deps just for time, especially
since java.time is much more useful now then java.util.Date!

we discovered the behaviour that some of datomic functionallity works with
java.time, others we need to do stuff like:
```
(-> (Clock/systemUTC)
(LocalDateTime/now)
(.minus 1 (ChronoUnit/MINUTES))
.toString
inst/read-instant-date)
```

it work with d/index-range but everything else so far throws
`ClassCastException java.time.LocalDateTime cannot be cast to
java.lang.Number `

again i dont want to add clj-time just for tests in a project where i dont
have to use that dep yet...

cheers
--
You received this message because you are subscribed to the Google Groups "Datomic" group.
To unsubscribe from this group and stop receiving emails from it, send an email to datomic+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Sooheon Kim
2017-08-06 11:41:38 UTC
Permalink
Hello,I would like to express my interest in this as well. java.time is
immutable!
--
You received this message because you are subscribed to the Google Groups "Datomic" group.
To unsubscribe from this group and stop receiving emails from it, send an email to datomic+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Joe Zulli
2017-08-08 19:25:40 UTC
Permalink
Ditto. This request got a good number of votes in Receptive, so I am
hopeful. Is this on the roadmap?
Post by Sooheon Kim
Hello,I would like to express my interest in this as well. java.time is
immutable!
--
You received this message because you are subscribed to the Google Groups "Datomic" group.
To unsubscribe from this group and stop receiving emails from it, send an email to datomic+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Isaac Zeng
2017-08-15 14:00:15 UTC
Permalink
It is obvious, the java.util.Date is used mostly. so, I think the best way
is to add more util functions for `java.util.Date`. I wrote this lib
<https://github.com/gfZeng/time.clj/>. hope you enjoy it, :)
Post by Peter Romfeld
Hi,
clojure.java.Date is just painful, using clj-time is quite nice but
sometime you dont want to add additional deps just for time, especially
since java.time is much more useful now then java.util.Date!
we discovered the behaviour that some of datomic functionallity works with
```
(-> (Clock/systemUTC)
(LocalDateTime/now)
(.minus 1 (ChronoUnit/MINUTES))
.toString
inst/read-instant-date)
```
it work with d/index-range but everything else so far throws
`ClassCastException java.time.LocalDateTime cannot be cast to
java.lang.Number `
again i dont want to add clj-time just for tests in a project where i dont
have to use that dep yet...
cheers
--
You received this message because you are subscribed to the Google Groups "Datomic" group.
To unsubscribe from this group and stop receiving emails from it, send an email to datomic+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Continue reading on narkive:
Loading...