Skip to content
Kotlin extensions for Java 8 java.time API
Branch: master
Clone or download
Latest commit 85a5b55 Aug 17, 2016
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
gradle/wrapper Initial commit Aug 17, 2016
src
LICENSE.txt Initial commit Aug 17, 2016
README.md support infix call syntax Aug 17, 2016
build.gradle Initial commit Aug 17, 2016
gradlew Initial commit Aug 17, 2016
gradlew.bat Initial commit Aug 17, 2016
settings.gradle Initial commit Aug 17, 2016

README.md

kxdate

This library contains various Kotlin extensions for the Java 8 java.time API.

Rails Style Date Constants

kxdate supports the Rails-style syntax for defining date constants:

val twoMonthsLater = 2.months.fromNow

val yesterday = 1.days.ago

(4.months + 5.years).fromNow

Alternatively, you can use the infix call syntax:

val twoMonthsLater = 2 months fromNow
val yesterday = 1 days ago
You can’t perform that action at this time.