1.7.0 • Published 5 years ago

klock v1.7.0

Weekly downloads
2
License
Apache-2.0
Repository
github
Last release
5 years ago

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:

(Compiled and tested with Gradle 5.4.1, JVM 12.0.1 and Kotlin 1.3.31). Starting with Klock 1.4.0, the library is available at jcenter.

def klockVersion = "1.7.3"

repositories {
    jcenter()
}

kotlin {
    sourceSets {
        commonMain {
            dependencies {
                implementation "com.soywiz.korlibs.klock:klock:$klockVersion" // Common 
            }
        }
    }
}

settings.gradle

enableFeaturePreview('GRADLE_METADATA')

Use with Kotlin-JVM

def klockVersion = "1.7.3"

repositories {
    jcenter()
}

dependencies {
    implementation "com.soywiz.korlibs.klock:klock-jvm:$klockVersion"
}

Versions

KlockKotlinGradle Metadata
1.7.01.3.501.0
1.6.01.3.501.0
1.5.01.3.401.0
1.4.01.3.211.0