src/main/scala/gigasecond.scala

1
2
3
4
5
6
7
8
9
10
11
12
13
import java.util.GregorianCalendar
import java.util.Calendar

object Gigasecond {
  def OneBillion = 1e9.toInt
  def apply(cal: Calendar) = new Gigasecond(cal)
}


class Gigasecond(cal: Calendar) {
  val date = cal.clone.asInstanceOf[Calendar]
  date.add(Calendar.SECOND, Gigasecond.OneBillion)
}

Comments


You're not logged in right now. Please login via GitHub to comment