Skip to content

Date/time types and utilities

License

Apache-2.0, Unknown licenses found

Licenses found

Apache-2.0
LICENSE
Unknown
license-report.md
Notifications You must be signed in to change notification settings

SpineEventEngine/time

Spine Time: Protobuf-based Date/Time types

Ubuntu build codecov   license

In addition to Timestamp and Duration natively available from Protobuf, the Spine Time library provides a set of data types for describing date and time in a business model.

The types provided by this library follow the conventions offered by Java Time.

Supported programming languages

The library currently supports Java, Kotlin (Protobuf DSL), and JavaScript.

For JavaScript code, please see the time-js module.

The versions 1.x and early 2.x snapshots are built using Java 8.

Starting 2.0.0-SNAPSHOT.76, all modules are built with Java 11. Therefore, consumer projects should aim for Java 11+ to use them.

Using Spine Time in a Gradle project

To add a dependency to a Gradle project, please use the following:

dependencies {
    implementation("io.spine:spine-time:$spineVersion") 
}

In addition to the generated types and basic factory and calculation routines, the library provides converters between its types and Java Time. It is expected that an application code would perform the date/time calculations using Java Time.

Integration with kotlinx-datetime

Compatibility with kotlinx-datetime planned for v2.0.