@@ -8,7 +8,6 @@ section: "home"
8
8
9
9
![ build] ( https://github.com/cquiroz/scala-java-time/workflows/build/badge.svg )
10
10
[ ![ Maven Central] ( https://img.shields.io/maven-central/v/io.github.cquiroz/scala-java-time_2.13.svg )] ( https://maven-badges.herokuapp.com/maven-central/io.github.cquiroz/scala-java-time_2.13 )
11
- [ ![ Scala.js] ( https://www.scala-js.org/assets/badges/scalajs-0.6.29.svg )] ( https://www.scala-js.org/ )
12
11
[ ![ Scala.js] ( https://www.scala-js.org/assets/badges/scalajs-1.0.0.svg )] ( https://www.scala-js.org/ )
13
12
14
13
This project provides an implementation of the ` java.time ` package, a date and time library that was added in Java 8.
@@ -59,8 +58,8 @@ Scala 2.11, 2.12 and 2.13 are supported.
59
58
60
59
To get started with SBT, add one of these dependencies:
61
60
62
- * ` libraryDependencies += "io.github.cquiroz" %% "scala-java-time" % "2.0 .0" ` (for Scala)
63
- * ` libraryDependencies += "io.github.cquiroz" %%% "scala-java-time" % "2.0 .0" ` (for Scala.js, [ Scala.js plugin] ( http://www.scala-js.org/tutorial/basic/#sbt-setup ) required)
61
+ * ` libraryDependencies += "io.github.cquiroz" %% "scala-java-time" % "2.4 .0" ` (for Scala)
62
+ * ` libraryDependencies += "io.github.cquiroz" %%% "scala-java-time" % "2.4 .0" ` (for Scala.js, [ Scala.js plugin] ( http://www.scala-js.org/tutorial/basic/#sbt-setup ) required)
64
63
65
64
To get the latest snapshots add the repo
66
65
@@ -71,10 +70,15 @@ resolvers +=
71
70
72
71
and either:
73
72
74
- * ` libraryDependencies += "io.github.cquiroz" %% "scala-java-time" % "2.0 .1-SNAPSHOT" ` (for Scala)
75
- * ` libraryDependencies += "io.github.cquiroz" %%% "scala-java-time" % "2.0 .1-SNAPSHOT" ` (for Scala.js, [ Scala.js plugin] ( http://www.scala-js.org/tutorial/basic/#sbt-setup ) required)
73
+ * ` libraryDependencies += "io.github.cquiroz" %% "scala-java-time" % "2.4 .1-SNAPSHOT" ` (for Scala)
74
+ * ` libraryDependencies += "io.github.cquiroz" %%% "scala-java-time" % "2.4 .1-SNAPSHOT" ` (for Scala.js, [ Scala.js plugin] ( http://www.scala-js.org/tutorial/basic/#sbt-setup ) required)
76
75
77
76
### Time zones
77
+ The library will try to guess the default timezone but it is not possible to ensure the detection will work in all cases.
78
+ It is highly recommended you set a default timezone explicitly. e.g.
79
+ ```
80
+ TimeZone.setDefault(...)
81
+ ```
78
82
79
83
#### No timezones
80
84
@@ -87,7 +91,7 @@ Example: `LocalDateTime.now(ZoneId.of("UTC"))`
87
91
The timezone for js is provided in a separate bundle which contains all time zones available from
88
92
[ IANA Time Zone Database] ( https://www.iana.org/time-zones ) . To use them you need to add the following dependency
89
93
90
- * ` libraryDependencies += "io.github.cquiroz" %%% "scala-java-time-tzdb" % "2.0 .0_2019c" ` (for Scala.js, [ Scala.js plugin] ( http://www.scala-js.org/tutorial/basic/#sbt-setup ) required)
94
+ * ` libraryDependencies += "io.github.cquiroz" %%% "scala-java-time-tzdb" % "2.4 .0_2019c" ` (for Scala.js, [ Scala.js plugin] ( http://www.scala-js.org/tutorial/basic/#sbt-setup ) required)
91
95
92
96
Note that the db is fairly large and due to the characteristics of the API it's not very ammenable to optimization
93
97
This database is published every now and then so it maybe old. For current version see the following section.
@@ -104,7 +108,7 @@ To do that you need to:
104
108
* Add ` sbt-tzdb ` to your list of plugins (Note you need sbt 1.x)
105
109
106
110
``` scala
107
- addSbtPlugin(" io.github.cquiroz" % " sbt-tzdb" % " 1 .0.0" )
111
+ addSbtPlugin(" io.github.cquiroz" % " sbt-tzdb" % " 4 .0.0" )
108
112
```
109
113
110
114
* Enable the plugin for your ` Scala.js ` project:
0 commit comments