Joda Time Extensions in Kotlin
supply arithmetic operation ( ,-,*,/) for joda-time DateTime
in Kotlin language
val now = DateTime.now()
val start = now 5.minutes()
val end = now 15.minutes()
val interval = start .. end
and supply Extension functions of DateTime
, Duration
, Instance
, Period
add dependency
<dependency>
<groupId>com.github.debop</groupId>
<artifactId>koda-time</artifactId>
<version>1.2.1</version>
</dependency>
add repository
<repositories>
<repository>
<id>jcenter</id>
<url>http://jcenter.bintray.com</url>
</repository>
</repositories>
or
<repositories>
<repository>
<id>debop-releases-bintray</id>
<url>http://dl.bintray.com/debop/maven</url>
</repository>
</repositories>
repository {
jcenter()
}
dependencies {
compile "com.github.debop:koda-time:1.2.1"
}
build by Gradle
$ ./gradlew clean build