Kotlin extensions for JSR-310, for Java 8 and ThreeTenABP.
Add the JitPack repository to your root build.gradle
at the end of repositories:
allprojects {
repositories {
...
maven { url "https://jitpack.io" }
}
}
Add the dependency in your app module build.gradle
file:
dependencies {
implementation "com.github.basshelal.ThreeTenKTX:java8:0.1.1" // for Java 8
implementation "com.github.basshelal.ThreeTenKTX:threetenabp:0.1.1" // for ThreeTenABP
}
Duration.between(LocalDate.now().atTime(17, 0), LocalDate.now().plusDays(1).atTime(2, 0))
(today at 5.pm) till (tomorrow at 2.am)