any library recommendation for lightweight date op...
# android
i
any library recommendation for lightweight date operations (like "days between 2 dates")? I'd prefer something that doesn't add extensions to numbers
google 1
stackoverflow 1
k
Joda Time?
i
okay I was looking for something lightweight and preferably written in Kotlin?
nothing against Joda Time, it just feels a bit overkill for this (and it's written in Java)
f
https://github.com/JakeWharton/ThreeTenABP ? not kotlin, but lightweight , but please check if it suits your needs
4
👍 2
c
Yes, the java.time APIs are absolutely wonderful for working with dates, and I’d encourage you to use them (or the ABP library port of it) as they are the intended standard API for dates on the JVM. They were developed with help from the Joda Time team, and Joda Time should now be considered deprecated (as noted on their website https://www.joda.org/joda-time/). A Kotlin MP alternative is Island Time, which looks pretty nice, though I haven’t actually used it for myself yet. It looks very similar to the java.time APIs, though it does add extensions to numbers (which I’m not a fan of, either). https://github.com/erikc5000/island-time
i
@Faraz @Casey Brooks the new java api looks good, thanks! 👍
b
i
@Barco thanks! Saw that too. But it adds extensions to numbers.