Date and time library for Multiplatform Kotlin 1.3.
Branch: master
Clone or download
Latest commit 4b2169c Feb 16, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
assets Klock logo Oct 28, 2017
buildSrc Update template Feb 16, 2019
gradle/wrapper 1.2.1 and update template Feb 9, 2019
klock DateTime min, max, clamp Feb 16, 2019
.gitignore Adding Android support Jan 13, 2019
.travis.yml Update template Feb 16, 2019
ACKNOWLEDGE 1.0.1 Tag Jan 14, 2019
LICENSE Own code for date processing (Leap Year processing and Month from day… Nov 1, 2018
LICENSE-APACHE Own code for date processing (Leap Year processing and Month from day… Nov 1, 2018
LICENSE-MIT
README.md Update README.md Nov 5, 2018
gradle.properties 1.2.3-SNAPSHOT Feb 16, 2019
gradlew 1.2.0 - Gradle 5.2 - Kotlin 1.3.21 - No metadata - Updated template Feb 6, 2019
gradlew.bat 1.2.0 - Gradle 5.2 - Kotlin 1.3.21 - No metadata - Updated template Feb 6, 2019
gradlew_linux Hopefully latest gradlew_* update Jan 21, 2019
gradlew_win Fix windows publishing Jan 24, 2019
gradlew_wine
linux Hopefully latest gradlew_* update Jan 21, 2019
publish
publish_local 1.2.1 and update template Feb 9, 2019
settings.gradle Update template Feb 16, 2019
travis_win.bat Try to fix windows Jan 16, 2019
win Hopefully latest gradlew_* update Jan 21, 2019

README.md

Klock

Klock is a Date & Time library for Multiplatform Kotlin 1.3.

It is designed to be as allocation-free as possible using Kotlin inline classes, to be consistent and portable across targets since all the code is written in Common Kotlin, and to provide an API that is powerful, fun and easy to use.

Build Status Maven Version Gitter

Full Documentation: https://korlibs.soywiz.com/klock/

Some samples:

val now = DateTime.now()
val duration = 1.seconds
val later = now + 1.months + duration
val is2018Leap = Year(2018).isLeap
val daysInCurrentMonth = now.yearMonth.days
val daysInNextMonth = (now.yearMonth + 1.months).days

Usage with gradle:

def klockVersion = "1.0.0"

repositories {
    maven { url "https://dl.bintray.com/soywiz/soywiz" }
}

// For multiplatform projects
implementation "com.soywiz:klock:$klockVersion"