I am writing my first Scala application and I am having a bit of a problem with nscala-time
wrapper for joda-time
library.
I have a class like this:
package domain
import org.joda.time.{Period => JodaPeriod}
case class GroundTime(val minimum: JodaPeriod, standard: JodaPeriod)
(I renamed Period
class because I already have Period
class in my domain)
Now, in my specs2
test I wanted to write something like:
"check standard ground time constraint" in {
import com.github.nscala_time.time.Imports._
val groundTime = GroundTime(minimum=10 minutes, standard=15 minutes)
but I am getting an error cannot resolve symbol minutes
.
I wanted to do something like snippet that is on github
page of nscala-time
library:
2.hours + 45.minutes + 10.seconds
// returns com.github.nscala_time.time.DurationBuilder
// (can be used as a Duration or as a Period)