도있다.
scala> import io.lamma._ // import at begining
import io.lamma._
scala> Date(2014, 7, 10) - Date(2014, 7, 3) // calculate date difference
res5: Int = 7
scala> (2014, 7, 10) - (2014, 7, 3) // implicit conversion from (Int, Int, Int)
res6: Int = 7
scala> (2014, 7, 10) + 3 // plus 3 days
res7: io.lamma.Date = Date(2014,7,13)
scala> (2014, 7, 10) + 5.weeks // plus 5 weeks
res8: io.lamma.Date = Date(2014,8,14)
scala> (2014, 7, 10) + (5 weeks) // this will work too
res9: io.lamma.Date = Date(2014,8,14)
scala> (2014, 7, 10) + (10 years) // another expression
res10: io.lamma.Date = Date(2024,7,10)
출처
2014-06-24 19:02:19
Max