blob: e8e7a65b72c6875febb183e3e36baf96bc08c6ca (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
//jvm/src/main/scala/simple/Platform.scala
package simple
import java.text.SimpleDateFormat
object Platform{
def format(ts: Long) = {
val fmt =
"MMMM d, yyyy h:mm:ss aaa z"
new SimpleDateFormat(fmt).format(
new java.util.Date(ts)
)
}
def main(args: Array[String]) = {
val times = Seq(
System.currentTimeMillis(),
System.currentTimeMillis() + 1000
)
println("Running on JVM! " + 1.0d)
println(Simple.formatTimes(times))
}
}
|