Skip to content

Migrated scala-core-date to scala 3 #1067

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Dec 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion scala-core-modules/scala-core-8/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,3 @@
- [The Either Type in Scala](https://www.baeldung.com/scala/either-type)
- [Understanding the Differences: reduceLeft, reduceRight, foldLeft, foldRight, scanLeft, and scanRight in Scala](https://www.baeldung.com/scala/reduce-fold-scan-left-right)
- [Different Ways to Reverse a Sequence in Scala](https://www.baeldung.com/scala/reverse-sequence)
- [Generate List of Dates Between a Range in Scala](https://www.baeldung.com/scala/date-range-list)
1 change: 1 addition & 0 deletions scala-core-modules/scala-core-dates/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ This module contains articles about Scala's date features.
- [Get Difference Between Two Dates](https://www.baeldung.com/scala/difference-between-two-dates)
- [Convert Epoch Milliseconds to DateTime in Scala](https://www.baeldung.com/scala/epoch-milliseconds-datetime)
- [Convert a String to Date in Scala](https://www.baeldung.com/scala/string-to-date)
- [Generate List of Dates Between a Range in Scala](https://www.baeldung.com/scala/date-range-list)
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
package com.baeldung.scala.datesandtimes
import java.text.SimpleDateFormat
import scala.concurrent.duration.Duration
import scala.concurrent.{Await, Future}
import scala.concurrent.{Await, ExecutionContext, Future}

object JavaUtilDate extends App {

implicit val ec = scala.concurrent.ExecutionContext.Implicits.global
implicit val ec: ExecutionContext =
scala.concurrent.ExecutionContext.Implicits.global

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

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

This file was deleted.