Back to directory
cquiroz avatar

scala-java-time

Implementation of the `java.time` API in scala. Especially useful for scala.js. Read more below about its uses, features, and usage.

Clone repository

git clone https://github.com/cquiroz/scala-java-time.git

130

Stars

34

Forks

3

Watchers

BSD-3-Clause

License

Scala Java-Time

build Maven Central Scala.js

This project provides an implementation of the java.time package, a date and time library that was added in Java 8. The implementation is based on the original BSD-licensed reference implementation (before it was contributed to OpenJDK).

Usage

The scala-java-time library is currently available for Scala (JVM, version 8 and later), Scala.js (JavaScript) and Scala Native (LLVM). Scala 2.11, Scala 2.12, Scala 2.13 and Scala 3.0.0 are supported.

To get started with SBT, add one (or both) of these dependencies:

  • libraryDependencies += "io.github.cquiroz" %%% "scala-java-time" % "2.6.0"
  • libraryDependencies += "io.github.cquiroz" %%% "scala-java-time-tzdb" % "2.6.0" (optional)

The second dependency contains all time zones available from IANA Time Zone Database. It can be removed if your code doesn't use timezones. Note that the timezone db is fairly large and due to the characteristics of the API it’s not very ammenable to optimization. This database is published every now and then so it may be old. For current version and more possibilities, pleae see the Time Zone section in the documentation.

Documentation

See the documentation

Releases

Jun 14, 2026

Download .zip

What's Changed

Add Scala Native to README by @sideeffffect in #437 ZoneOffset.of("Z") must return UTC by @keynmol in #520 Fix source map URLs (as much as possible). Fixes #519 by @raquo in #551 Updat...

What's Changed

Scala Native 0.5.x (#508) @sideeffffect Update versions (#509) @sideeffffect Run Scala 3 / Native job on macOS (#440) @armanbilge

Nov 27, 2022

Download .zip

What's Changed

Update some libs (#423) @cquiroz Update sbt-scalajs, scalajs-compiler, ... to 1.12.0 (#420) @scala-steward Update nscplugin, sbt-scala-native, ... to 0.4.9 (#421) @scala-steward Fix pa...

May 15, 2021

Download .zip

What's Changed

Upgrade to Scala 3 (#286) @mpilquist Update scalatest to 3.2.9 (#285) @scala-steward Update sbt to 1.5.2 (#284) @scala-steward Bump actions/cache from v2.1.4 to v2.1.5 (#283) @dependab...

Apr 22, 2021

Download .zip

What's Changed

Update scala 3 (#279) @cquiroz Update scalatest to 3.2.8 (#278) @scala-steward Update sbt (#276) @cquiroz Scala 3.0.0-RC2 (#277) @keynmol Update sbt-scalajs, scalajs-compiler, ... to 1...