Skip to content

Commit 969f02d

Browse files
authoredDec 13, 2023
Merge pull request #1067 from yadavan88/date-module-migration
Migrated scala-core-date to scala 3
2 parents 078e50f + c59da78 commit 969f02d

File tree

16 files changed

+5
-24
lines changed

16 files changed

+5
-24
lines changed
 

‎scala-core-modules/scala-core-8/README.md

-1
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,3 @@
44
- [The Either Type in Scala](https://www.baeldung.com/scala/either-type)
55
- [Understanding the Differences: reduceLeft, reduceRight, foldLeft, foldRight, scanLeft, and scanRight in Scala](https://www.baeldung.com/scala/reduce-fold-scan-left-right)
66
- [Different Ways to Reverse a Sequence in Scala](https://www.baeldung.com/scala/reverse-sequence)
7-
- [Generate List of Dates Between a Range in Scala](https://www.baeldung.com/scala/date-range-list)

‎scala-core-modules/scala-core-dates/README.md

+1
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@ This module contains articles about Scala's date features.
99
- [Get Difference Between Two Dates](https://www.baeldung.com/scala/difference-between-two-dates)
1010
- [Convert Epoch Milliseconds to DateTime in Scala](https://www.baeldung.com/scala/epoch-milliseconds-datetime)
1111
- [Convert a String to Date in Scala](https://www.baeldung.com/scala/string-to-date)
12+
- [Generate List of Dates Between a Range in Scala](https://www.baeldung.com/scala/date-range-list)
+4-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
package com.baeldung.scala.datesandtimes
22
import java.text.SimpleDateFormat
33
import scala.concurrent.duration.Duration
4-
import scala.concurrent.{Await, Future}
4+
import scala.concurrent.{Await, ExecutionContext, Future}
55

66
object JavaUtilDate extends App {
77

8-
implicit val ec = scala.concurrent.ExecutionContext.Implicits.global
8+
implicit val ec: ExecutionContext =
9+
scala.concurrent.ExecutionContext.Implicits.global
910

1011
val format: ThreadLocal[SimpleDateFormat] =
1112
new ThreadLocal[SimpleDateFormat] {
@@ -31,5 +32,5 @@ object JavaUtilDate extends App {
3132
val date1 = Await.result(r1, Duration.Inf)
3233
val date2 = Await.result(r2, Duration.Inf)
3334

34-
println(date1 + ", " + date2) // Prints "Wed Jul 01 2020, Fri Aug 21 2020"
35+
println(s"$date1, $date2") // Prints "Wed Jul 01 2020, Fri Aug 21 2020"
3536
}

‎scala-core-modules/scala-core-dates/src/test/scala-2/com/baeldung/scala/datesandtimes/JavaUtilDateUnitTest.scala

-20
This file was deleted.

0 commit comments

Comments
 (0)
Please sign in to comment.