@korlibs/klock-locale

1.7.5 • Public • Published

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:

(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

Klock Kotlin Gradle Metadata
1.7.0 1.3.50 1.0
1.6.0 1.3.50 1.0
1.5.0 1.3.40 1.0
1.4.0 1.3.21 1.0

Readme

Keywords

Package Sidebar

Install

npm i @korlibs/klock-locale

Weekly Downloads

8

Version

1.7.5

License

Apache-2.0

Unpacked Size

77.9 kB

Total Files

7

Last publish

Collaborators

  • soywiz