You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 28, 2021. It is now read-only.
scala> val d2 = new Date(2017,0,1)
<console>:12: warning: constructor Date in class Date is deprecated: see corresponding Javadoc for more information.
val d2 = new Date(2017,0,1)
^
d2: java.util.Date = Mon Jan 01 00:00:00 EST 3917
scala> import com.meetup.timeywimey.JodaConverterImplicits._
import com.meetup.timeywimey.JodaConverterImplicits._
scala> import com.meetup.timeywimey.LegacyConverterImplicits._
import com.meetup.timeywimey.LegacyConverterImplicits._
scala> d2.toLocalDate.plusDays(4).asJoda.toDate
java.time.DateTimeException: Invalid value for MonthOfYear (valid values 1 - 12): 0
at java.time.temporal.ValueRange.checkValidValue(ValueRange.java:311)
at java.time.temporal.ChronoField.checkValidValue(ChronoField.java:703)
at java.time.LocalDate.of(LocalDate.java:267)
at com.meetup.timeywimey.LegacyConverters.toLocalDate(LegacyConverters.java:66)
at com.meetup.timeywimey.LegacyConverterImplicits$DateToJava8.toLocalDate(LegacyConverterImplicits.scala:36)
... 43 elided
scala>
The text was updated successfully, but these errors were encountered:
repro (ignore the deprecated warnings):
The text was updated successfully, but these errors were encountered: